I am installing my team's installation of Magento on my developer machine, and I am getting this error message when I try to go to the frontend root or the /admin of the website:

Fatal error: Uncaught Error: Call to a member function getModelInstance() on null in /Applications/XAMPP/xamppfiles/htdocs/wt/app/Mage.php:463

Stack trace:

#0 /Applications/XAMPP/xamppfiles/htdocs/wt/app/code/core/Mage/Core/Model/App.php(919): Mage::getModel('core/store')
#1 /Applications/XAMPP/xamppfiles/htdocs/wt/app/code/core/Mage/Core/Model/App.php(834): Mage_Core_Model_App->_getDefaultStore()
#2 /Applications/XAMPP/xamppfiles/htdocs/wt/app/Mage.php(920): Mage_Core_Model_App->getStore()
#3 /Applications/XAMPP/xamppfiles/htdocs/wt/app/Mage.php(702): Mage::printException(Object(Mage_Core_Exception))
#4 /Applications/XAMPP/xamppfiles/htdocs/wt/index.php(83): Mage::run('', 'store') #5 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/wt/app/Mage.php on line 463

How can I resolve this?


This error is tricky. Magento has thrown some exception and tries to print it but then runs into another error. Now we don't know what the original exception was, only that it occured very early, before the config model has been initialized, judging by the error message.

But there is a way to make Magento actually print the exception on the screen without trying to load anything additionally: enable developer mode

See: How to enable Developer Mode in Magento 1.7

  • I tried setting the Magento developer mode, and theproblem is still there, and I don't see much more than I did prior to this change. – Vladimir Despotovic Sep 27 '16 at 22:51

Somehow I resolved this on the fly, and I had a similar problem with another function - and also getting the "Call to a member function getModelInstance() on null in...." error message. I resolved it by creating var and media folders (for some reason I didn't have them), and putting 777 permissions on them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.