Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento, Fatal error, 'Call to ... getAllOptions() on a non-object ... Core\Model\Cache.php'

Tags:

magento

After adding to my frontend/default/[theme]/ folder I hit an error where the site would no longer load. I removed the offending file, but the site still won't load. Enabling PHP error output leads to this message:

Fatal error: Call to a member function getAllOptions() on a non-object in C:\websites\[snip]\htdocs\app\code\core\Mage\Core\Model\Cache.php on line 449

I have cleared the cache, and nothing is being created in the var/cache folder when pages are (attempted to be) loaded... Any ideas what else could be cached somewhere?

Also note, this has taken both the frontend and backend offline, so I have no access to the admin system.

This appears to be the same problem mentioned here (site down - Fatal error: includes/src/Mage_Core_Model_Cache.php on line 434). I don't have the compiler enabled though, so the error is directly in Core/Model/Cache.php.

like image 298
James Avatar asked May 14 '12 15:05

James


3 Answers

In my case this problem occured because my app/etc/config.xml file was missing. Try to see if your XML's config files are there.

like image 112
Ricardo Martins Avatar answered Nov 10 '22 02:11

Ricardo Martins


Solution:

copy app/etc/config.xml from original magento to your magento.

like image 31
jruzafa Avatar answered Nov 10 '22 02:11

jruzafa


Here is the way to fix it (It worked for me after lot of research):

chmod 644 app/etc/config.xml
chmod 755 app/etc
chmod 755 app/etc/modules

rm -rf var/cache/* var/session/*
php shell/indexer.php --reindexall
like image 41
Imran Zahoor Avatar answered Nov 10 '22 03:11

Imran Zahoor