Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Upgrade from 1.5 to 1.7 caused “getAllOptions” error
 
Christen
Jr. Member
 
Total Posts:  19
Joined:  2010-11-10
 

After upgrading via command line, I got this error from any page

Fatal error: Call to a member function getAllOptions() on a non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Cache.php on line 455

Any assistance on how to fix this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Christen
Jr. Member
 
Total Posts:  19
Joined:  2010-11-10
 

Ok, I’ve managed to narrow down the error a bit, but I’m still not sure if it’s what’s causing it.

After the upgrade, var directory is not writable by Magento and it’s causing it to write to /tmp/magento. I tried changing the permissions to 777 for the whole installation to no avail.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Christen
Jr. Member
 
Total Posts:  19
Joined:  2010-11-10
 

Debugging debugging, so far I’ve found this when trying to check what caused the error.

Fatal error: Uncaught exception ‘Mage_Core_Exception’ with message ‘Invalid dir type requested: base’ in /var/www/html/magento/app/Mage.php:579
Stack trace:
#0 /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php(80): Mage::exception(’Mage_Core’, ‘Invalid dir typ...’)
#1 /var/www/html/magento/app/Mage.php(328): Mage_Core_Model_Config_Options->getDir(’base’)
#2 /var/www/html/magento/app/Mage.php(924): Mage::getBaseDir()
#3 /var/www/html/magento/app/Mage.php(693): Mage::printException(Object(Mage_Core_Exception))
#4 /var/www/html/magento/index.php(88): Mage::run(’’, ‘store’)
#5 {main}
thrown in /var/www/html/magento/app/Mage.php on line 579

Now why would it error out on getting the Magento directory?

 
Magento Community Magento Community
Magento Community
Magento Community
 
torvaldz
Jr. Member
 
Total Posts:  2
Joined:  2012-04-25
 

Same problem here, pls help smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
pgulikers
Jr. Member
 
Total Posts:  27
Joined:  2009-02-21
 

Got this error too :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
RB2009
Member
 
Total Posts:  40
Joined:  2010-12-05
 

better to do a fresh install

its a hastle I know, but less likely to corrupt.

What I normally do is..

Export the existing database
Import that existing database into a new database

upload the new version files to a new folder on the server, redirect domains to the new folder.

run through the installation, connecting to the new database which I imported the old database into.

re-install the extensions

transfer accross the themes, and update any changed files.

then setup a clean database install in a 3rd database and run a repair on the database I just upgraded using magento repair database tool.. running a repair is not necessary but I do it anyway to root out any corruption in the database, as on the odd occasion I have found corruption to occur during the upgrade process… so its more of a good practice thing.

run through all the settings to check, and also update any new settings which didnt exist previously.

but doing it that way, any upgrade you do is not effecting the existing site, and you are free to revert back at any time should the upgrade go wrong.. effectively you are setting up a 2nd website to run alongside the existing website… then shutting down the existing website once the upgraded site is fully functional.

takes me on average about 4 hours to do properly… but well worth it to minimize corruption… and gives you an escape route should things go wrong.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pgulikers
Jr. Member
 
Total Posts:  27
Joined:  2009-02-21
 

Solved it by uncommenting line 198 in app/Mage.php:

//self::$_appRoot = null;

which is called by app/code/core/Mage/Core/Model/Config/Options.php at line 54:

$appRoot= Mage::getRoot();

This returns an empty string, that\’s why Magento was broken.
After uncommenting self::$_appRoot = null in Mage.php everything ran fine!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Christen
Jr. Member
 
Total Posts:  19
Joined:  2010-11-10
 

Did you mean commenting it?

I already tried commenting this line yesterday and let Magento update the database (it’s already big so it took quite sometime), after getting back in the office, it looks like it ran fine.

Now I’m still wondering why reset() is being called from an upgraded Magento. Could it be due to extensions?

Also, I’m not sure I find the need for resetting the appRoot variable.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pgulikers
Jr. Member
 
Total Posts:  27
Joined:  2009-02-21
 

Yes, I meant commenting ofcourse grin

In earlier versions appRoot wasn’t cleared in the reset function, I’m wondering why they choose to do so in 1.7.
So I guess it’s not that important to have it cleared.

Anyway, Magento runs fine without it!

 
Magento Community Magento Community
Magento Community
Magento Community
 
magentoinchina
Member
 
Avatar
Total Posts:  32
Joined:  2009-07-12
 

you need to reinstall the latest aitoc extensions

 
Magento Community Magento Community
Magento Community
Magento Community
 
MichalL
Jr. Member
 
Total Posts:  14
Joined:  2008-03-02
Kraków
 

I have similar problem.
@magentoinchina - can you please which exactly AITOC module should be upgraded? Is it any specific module or something like \"install\" or \"sys\" module?
I have their Reviews Booster, Custom Options Templates, Shop by Brands.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dannyz1984
Sr. Member
 
Avatar
Total Posts:  153
Joined:  2009-04-12
 

Hello, I have experienced your error, and user magentoinchinais correct in saying that AITOC extension (custom options template for me) may be the problem.

AITOC’s programmers for some strange reason put App.php in app/code/core/Mage/Core/Model/App.php

which overrides any xml extension disable commands. this makes some believe they have a problem with their core when they try to disable all extensions but still cannot get it to work. I suggest you upload newest version of AITOC and problem should be fixed or rename that file (it’s only purpose is to serve AITOC’s extensions and try to load site again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Christen
Jr. Member
 
Total Posts:  19
Joined:  2010-11-10
 

Thanks for pinpointing the problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Xedios
Member
 
Avatar
Total Posts:  42
Joined:  2009-08-19
Lancaster, PA
 
magentoinchina - 07 May 2012 07:41 AM

you need to reinstall the latest aitoc extensions

Hit the nail on the head! Many thanks for saving possibly hours of troubleshooting!

 
Magento Community Magento Community
Magento Community
Magento Community
 
aaronwallace
Member
 
Total Posts:  59
Joined:  2011-07-18
 

Check this blog.... I hope this might help

http://www.expertmagentodevelopers.com/blog/magento-1-7-upgrade-errors-with-solutions/

 
Magento Community Magento Community
Magento Community
Magento Community
 
SteveBerrill
Member
 
Avatar
Total Posts:  36
Joined:  2010-09-21
Preston
 

Downloading & reuploading new AITOC extension via ftp then deleting cache worked for me.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2