Magento Forum

   
Can’t retrieve entity config: customer/eav_attribute
 
Bigwebmaster
Jr. Member
 
Total Posts:  5
Joined:  2010-01-10
 

I have spent hours on this problem so far and still cannot find a resolution. I do see others who have reported the issue, but none of the solutions have worked for me.

Currently we decided to install a fresh copy of Magento version 1.7.0.2 and everything went great. The problem didn\’t arise until one of the upgrade scripts in a plugin tried to run:

$this->startSetup();

$this->addAttribute('customer''customer_activated', array(
        
'type' => 'int',
        
'input' => 'text',
        
'label' => 'Is activated',
        
'global' => 1,
        
'visible' => 1,
        
'required' => 0,
        
'user_defined' => 1,
        
'default' => '0',
        
'visible_on_front' => 0,
));

$this->endSetup();

This resulted in an error on any page of the website with:

Can’t retrieve entity config: customer/eav_attribute

So my first thought was that this addon is simply outdated and maybe that above code is no longer valid. I believe this is not the case though as I can find nothing wrong with that code, and have tried other versions of it. After trying many things I decided to instead copy the current site and instead upgrade it to the current version via shell following the instructions here:

http://www.magentocommerce.com/wiki/groups/227/upgrading_magento_via_ssh

Everything went fine for the most part. A few hiccups which I fixed. Finally the last hiccup which stopped me was when trying to goto the admin area, I get this error:

Error in file"/home/h2o4k9/magento17.h2o4k9.com/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" Can't retrieve entity config: customer/eav_attribute

Trace:
#0 /home/h2o4k9/magento17.h2o4k9.com/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('
Mage_Core', 'Error in file: ...')
#1 /home/h2o4k9/magento17.h2o4k9.com/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('
upgrade', '1.4.0.0.14', '1.6.2.0.1')
#2 /home/h2o4k9/magento17.h2o4k9.com/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('
1.4.0.0.14', '1.6.2.0.1')
#3 /home/h2o4k9/magento17.h2o4k9.com/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/h2o4k9/magento17.h2o4k9.com/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/h2o4k9/magento17.h2o4k9.com/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /home/h2o4k9/magento17.h2o4k9.com/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home/h2o4k9/magento17.h2o4k9.com/index.php(87): Mage::run('', '
store')
#8 {main}

So this is very interesting as I am now getting the same error I was with the fresh install of Magento where I was trying to install an addon. But this one is basically showing that the core Magento scripts that are trying to update the database is having the same problems with the code when it runs. It seems like anything that tries to retreive the entity config customer/eav_attribute has problems.

The difficult part with this is that for a fresh install of Magento this problem happens, and then for and upgrade to an old site with an old database this happens when Magento goes through the upgrade process.

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bigwebmaster
Jr. Member
 
Total Posts:  5
Joined:  2010-01-10
 

For reference I have tried a few things from what I have found elsewhere including:

UPDATE `eav_entity_typeSET `attribute_model` = 'customer/attribute', `additional_attribute_table` = 'customer/eav_attribute', `entity_attribute_collection` = 'customer/attribute_collection' WHERE `eav_entity_type`.`entity_type_code` = 'customer';

but that has no effect since the values in the table in the database are already set to what this was doing. So that fix does not work. Someone else mentioned that adding an order_by field as a varchar(2) to the customer_eav_attribute table might fix the problem. This did not work either.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top