Error loading in Magento admin - magento

When I load my Magento admin I get the error.
Fatal error: Call to a member function isLoggedIn() on a non-object
in /home/xxx/public_html/app/code/community/TM/Core/Model/Observer.php
on line 12
I think it happened when I replaced some files somewhere in app/code/...
I’m really stuck on this and need desperate help.

Error is in your extension file TM/Core/Model/Observer.php
Disable extension and check after refresh cache

This was fixed by the Full Page Cache Extension people.
I don't know what they did but it was their extension which broke my magento however they fixed it for me right away

Related

Magento cant make an order

I have an installation of Magento 1.9.2. I am using a custom theme, and anytime I try and place an order it kicks off the Ajax on the page and then stops with no error messages, but does leave a log:
ERR (3): User Error: Some transactions have not been committed or rolled back in /html/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 4039
I have spent 2 days trying to get to the bottom of this with no joy. It doesn't matter what payment method I use its always the same.
You should try to log all MySQL queries to see what wrong here. lib/Varien/Db/Adapter/Pdo/Mysql.
Open the file lib/Varien/Db/Adapter/Pdo/Mysql.php and change the value of the protected property $_debug to true. You can also change the value of $_logQueryTime which is especially handy when debugging slowdowns. Once you make this change all queries will be logged in the file var/debug/pdo_mysql.log
Hope this will help you. Please put your corrupted query here if you fixed it.
I had today the same problem. Magento 1.9.2.4 with a custom theme. Everything worked fine, expect the checkout-process. The custom theme used the PHP short open tag <? php code ?> . After enabling short_open_tag in the php.ini, everything works fine.

PrestaShop Smarty fatal error

I am really new to PrestaShop and am facing trouble debugging an error in PrestaShop 1.6.1.3
It was working just fine, until I have changed some localization and delivery settings in admin panel.
Now, whenever I make an order, and try to proceed with bank wire payment, I receive the following error:
Fatal error: Call to undefined method Tools::getInvoiceProductName() in /home/makede/domains/manokede.lt/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 36
Any help or guidance for how to solve it or at least debug deeper is much appreciated.
by default class Tools have no method called getInvoiceProductName in Presta, if you added this line (where method called), just comment/delete it
Can you please try clearing your cache and then check again?

Getting an error while adding a role in Magento

I am setting up a Magento(v. 1.6.1.0) site.
To access the API, I needed to create a rule (Admin > System > Web Services > Rules > Add new rule).
When I click the button, I got the following error.
Fatal error: Call to a member function toHtml() on a non-object in /home/dinamal7/public_html/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php on line 52
I ran some research about the issue but couldn't find any solution. Can anybody help me?
Thanks.
Sam
#Sam, looks like there is some problem with the object calling that particular function. As you can see, it is indicating the core file, which is not supposed to have any errors. You can try and replace the "core" folder of your current installation with the one extracted fresh. This should do the trick.

Magento can't save new products anymore

Everything was fine 'til this morning. I've tried clearing cache, re indexing, all tips I could find on the internet.
Here is the message I'm getting
Fatal error: Call to a member function getId() on a non-object in /home5/rockbott/public_html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 578
here is line 577 and 578:
if (Mage::app()->isSingleStoreMode()) {
$product->setWebsiteIds(array(Mage::app()->getStore(true)->getWebsite()->getId()));
A newly created product gives me Fatal Error message. Duplicated product gives me the same, but when I go to manage products it appears, but without SKU# and 0 stock count. When I try to edit that product again - I get Fatal Error.
Please help me with my problem.
Thanks in advance.
Thanks for your response.
Someone suggested that I clear log file and I did. I'm sorry I don't have the log file. Compiler is disabled as well. Would you be kind enough to take a look here: http://www.magentocommerce.com/boards/viewthread/347764/ I've posted more information there including reports.
Thank you
Anna
I realize this is old, but on a Magento 1.9.0.1 install i was having the same problem. I'm not sure what is happening but enabling the cache allowed it to work for me. Weird.
What appears to be causing it in my case is a remnant logging line in Mage.php that I was using to track events.
On line 447 I had:
Mage::log($name, null, 'events.log');
Removing this logging line resolved the issue.
With your informations is difficult to find the problem.
Can you paste your system.log file?
One question: Do you have the compiler enabled? Try to disable it.
I had the same error. Solution turned out to be very simple: you need to replace getStore(true) to getStore(1).
Its very strange because in PHP true same as 1 ... but in this it was a mistake. If you make a "more correct" and write:
$product->setWebsiteIds(array(Mage::app()->getStore(Mage::app()->getStore()->getId())->getWebsite()->getId()));
Magento give you not true website. Was too lazy to look for, as well as programmers Magento (getStore (true)) :)) so I decided to leave it

Error after login to Magento on core/Mage/Admin/Model/User.php on line 437

None of out programmers has changed anything to the code, but out of nothing now, when a user tries to login on the backend, we have this error:
Fatal error: Call to a member function children() on a non-object in
/home/r1tech/public_html/app/code/core/Mage/Admin/Model/User.php on
line 437
Any ideas why this is happening?
Not a real Magento problem.
Somehow the files got corrupted. I re-uploaded everything and now it works just fine.
Leaving this for the occasional googler with this issue:
We had this problem today, after we had tested different caching mechanisms for Magento. In the process, the file cache directory was somehow corrupted or otherwise made unusable. If you're not keen on reuploading the entire thing as Beto Frega suggests, you should be able to solve it by removing (or renaming) the var/cache (in the Magento webroot, not the server itself!!) directory and creating a new one, which you then obviously give write permissions to.
This solved the issue for us -- and incidentally also some performance issues in the backend, due to the sheer size of the old cache dir.

Resources