Magento – Notice: Trying to get property of non-object

coreerrormagento-1

Huge error as soon as I try to view any page on my magento site now displays:

Notice: Trying to get property of non-object in /httpdocs/app/code/core/Mage/Core/Model/Config.php on line 1227
app/code/core/Mage/Core/Model/Config.php on line 1239
Fatal error: Call to a member function getIdFieldName() on a non-object in /app/code/core/Mage/Core/Model/Abstract.php on line 151

If anyone knows what is causing this you will be saving my life.

Best Answer

I had this same problem while installing an instance of Magento within our testing environment. Because I downloaded Magento Enterprise on my local machine and pushed the code to the test environment using GIT, my .gitignore file left out the enterprise.xml and config.xml. Because these files were missing it generated the error message described by the OP. Once in place, it sent me to the Magento Install page! Hope that helps someone out there.