3

I have downgrade the magento from ee to ce edition but , while indexing i am facing this issue .does any one have solution for this.

( ! ) Fatal error: Call to a member function getEntityTypeId() on a non-object in /vagrant/app/code/core/Mage/Catalog/Model/Resource/Url.php on line 585
Call Stack
#   Time    Memory  Function    Location
1   0.0043  263432  {main}( )   .../index.php:0
2   0.0086  296440  Mage::run( )    .../index.php:103
3   0.0377  487576  Mage_Core_Model_App->run( ) .../Mage.php:684
4   6.6529  3158576 Mage_Core_Controller_Varien_Front->dispatch( )  .../App.php:365
5   6.6765  3245912 Mage_Core_Controller_Varien_Router_Standard->match( )   .../Front.php:172
6   6.6991  3464208 Mage_Core_Controller_Varien_Action->dispatch( ) .../Standard.php:254
7   11.9966 6641320 Mage_Index_Adminhtml_ProcessController->reindexProcessAction( ) .../Action.php:418
8   12.0678 7160720 Mage_Index_Model_Process->reindexEverything( )  .../ProcessController.php:127
9   12.0755 7221192 Mage_Index_Model_Process->reindexAll( ) .../Process.php:260
10  12.1271 7370056 Mage_Catalog_Model_Indexer_Url->reindexAll( )   .../Process.php:212
11  12.1457 8003408 Mage_Catalog_Model_Url->refreshRewrites( )  .../Url.php:257
12  12.2368 8925424 Mage_Catalog_Model_Url->refreshRewrites( )  .../Url.php:248
13  12.5461 9140848 Mage_Catalog_Model_Url->refreshProductRewrites( )   .../Url.php:255
14  12.5570 9143416 Mage_Catalog_Model_Resource_Url->getProductsByStore( )  .../Url.php:538
15  12.5570 9144040 Mage_Catalog_Model_Resource_Url->_getProducts( )    .../Url.php:1033
16  12.6551 9745384 Mage_Catalog_Model_Resource_Url->_getProductAttribute( )    .../Url.php:997
2

It looks like you've deleted the product url_key by running something like:

DELETE FROM eav_attribute WHERE backend_model LIKE 'enterprise_%';

Can you check your eav_attribute table?

mysql> select * from eav_attribute where attribute_code="url_key"\G
*************************** 1. row ***************************
   attribute_id: 35
 entity_type_id: 3
 attribute_code: url_key
attribute_model: NULL
  backend_model: catalog/category_attribute_backend_urlkey
   backend_type: varchar
  backend_table: NULL
 frontend_model: 
 frontend_input: text
 frontend_label: URL Key
 frontend_class: 
   source_model: 
    is_required: 0
is_user_defined: 0
  default_value: 
      is_unique: 0
           note: 
*************************** 2. row ***************************
   attribute_id: 86
 entity_type_id: 4
 attribute_code: url_key
attribute_model: NULL
  backend_model: catalog/product_attribute_backend_urlkey
   backend_type: varchar
  backend_table: NULL
 frontend_model: 
 frontend_input: text
 frontend_label: URL Key
 frontend_class: 
   source_model: 
    is_required: 0
is_user_defined: 0
  default_value: 
      is_unique: 0
           note: 
2 rows in set (0.00 sec)
1

Yanted's guide deletes that product url_key from the eav_attribute table. I had to manually re-add attribute_id 86 to the table (exactly as Phil's results show above for the second row). Just add that row back in to the table, refresh, then reindex.

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.