1

I'm running Magento 1.9 and the site is fully setup and running, now I'm getting the following error.

Error in file: "/app/code/core/Mage/Eav/sql/eav_setup/install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'eav_entity_type' already exists

Trace:
#0 /app/code/core/Mage/Core/Model/Resource/Setup.php(644): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.0.1')
#2 /app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.0.1')
#3 /app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /index.php(87): Mage::run('', 'store')
#8 {main}

After cache builds up the above error becomes

Fatal error: Cannot access property Mage_Core_Model_Resource_Website_Collection::$_model in /app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php on line 430

How can I fix this, it appears to be trying to re-install.

0

if there were no any changes in Magento code (according to the question it just suddenly occurred for no reason), please contact your host, as the only possible reason would be database corruption or filesystem corruption. Check it with your hosting support and request them to restore the last consistent backup of your site.

Otherwise (in case you installed extensions, changed themes or someone was fixing Magento code)

  • Restored the last backup of the DB that didn't help. – user2240778 Feb 11 at 10:12
0

If it keeps trying to reinstall the install-1.6.0.0.php over and over again you can do the following:

First make sure the script has already been installing by reflecting the contents of the script and the changes to your database.

After this has been verified you can manually skip this install script using the core_resource table in the database which keeps track of which sql scripts have already been installed.

In order to skip this script that is causing issues you can update the table using the following query:

UPDATE core_resource SET version='1.6.0.0', data_version = '1.6.0.0' WHERE code = 'eav_setup'

If that still doesn't fix your issue you could try changing the above query to from 1.6.0.0 to 1.6.0.1 as well.

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.