开发者

Fatal error: Call to a member function setActive() on a non-object

开发者 https://www.devze.com 2023-01-18 11:28 出处:网络
I am getting the followin开发者_如何学运维g error on the backend of Magento: Fatal error: Call to a member function setActive() on a non-object in /var/www/vhosts/pro-pin.ca/httpdocs/app/code/core/Ma

I am getting the followin开发者_如何学运维g error on the backend of Magento:

Fatal error: Call to a member function setActive() on a non-object in /var/www/vhosts/pro-pin.ca/httpdocs/app/code/core/Mage/Adminhtml/Controller/Action.php on line 82

I've gone through the community forum, but found out that this was due to the magic slider or lightbox extensions. I haven't had this problem on any other server.

Any help please..


Based on line number I'm primarily running a different version of Magento than you, but if you look at Action.php, you'll see something like this

protected function _setActiveMenu($menuPath)
{
    $this->getLayout()->getBlock('menu')->setActive($menuPath);
    return $this;
}

The call to

$this->getLayout()->getBlock('menu')

is supposed to return a block object, but if your system it isn't. The most likely culprit here in one of your extensions is removing the block named menu from your layout, or one of your developers fiddled with some layout and/or Core files.

In your development environment remove all your modules. If the problem goes away, re-enable until it starts again and you'll know which module is causing you a problem. If the problem doesn't go away, grab a fresh copy of Magento and start diffing files.


I removed all the extension and tried but no success, but when i replaced the adminhtml layout files it worked. The layout files directory was adminhtml/default/default/layout/


Before deleting you module, try manually clearing the cache files.

go to var/cache and delete all the directories in the folder (if prompted with any denied messages, skip those items). Be patient there may be a few thousand cache files. When finished, try and login again, 9 out of 10 times you will be able to.


you will need to remove local.xml file and to re-install your store(no data loss -This installs the magento engine without removing your data.

Hope this helps.


Try:

ini_set('memory_limit', '256M');

in index.php or increase memory to your php.ini.

0

精彩评论

暂无评论...
验证码 换一张
取 消