Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Category Flat Data and Category Products not reindexing! 
 
primodvdprices
Jr. Member
 
Total Posts:  10
Joined:  2011-04-10
 

I have version 1.6.0.0 and I’m trying to reindex but they are stuck in processing. I know it has something to do with my database and I’m getting this error and I don’t know how to fix it. Can someone help me?

Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`cheap3x_mgto1/#sql-5d93_1adce9`, CONSTRAINT `FK_CAT_PRD_FLAT_1_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON U)’ in /home/cheap3x/public_html/lib/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /home/cheap3x/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /home/cheap3x/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) #2 /home/cheap3x/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array) #3 /home/cheap3x/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) #4 /home/cheap3x/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’ALTER TABLE `ca...’, Array) #5 /home/cheap3x/public_html/lib/Var in /home/cheap3x/public_html/lib/Zend/Db/Statement/Pdo.php on line 228

Thanks to anybody who can help me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hedigereigh122
Jr. Member
 
Total Posts:  1
Joined:  2011-10-05
 

Have you checked whether it’s a charset problem? For I have the same version of you but not experience such problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
primodvdprices
Jr. Member
 
Total Posts:  10
Joined:  2011-04-10
 

I tried that also. I set everything to 777 and it still didn’t reindex. I have over 10k items. I’ve tried all the solutions on the forums but still this issue won’t go away.

 
Magento Community Magento Community
Magento Community
Magento Community
 
primodvdprices
Jr. Member
 
Total Posts:  10
Joined:  2011-04-10
 

I fixed it but now I’m getting these errors in my database. Does anybody know how to fix them?

catalog_product_entity_varchar “Catalog Product Varchar Attribute Backend Table”

The indexes IDX_CATALOG_PRODUCT_ENTITY_VARCHAR_ENTITY_ID and FK_CATALOG_PRODUCT_ENTITY_VARCHAR_PRODUCT_ENTITY seem to be equal and one of them could possibly be removed.

The indexes IDX_CATALOG_PRODUCT_ENTITY_VARCHAR_STORE_ID and FK_CATALOG_PRODUCT_ENTITY_VARCHAR_STORE seem to be equal and one of them could possibly be removed.

The indexes IDX_CATALOG_PRODUCT_ENTITY_VARCHAR_ATTRIBUTE_ID and FK_CATALOG_PRODUCT_ENTITY_VARCHAR_ATTRIBUTE seem to be equal and one of them could possibly be removed.

The indexes UNQ_CAT_PRD_ENTT_VCHR_ENTT_ID_ATTR_ID_STORE_ID and IDX_ATTRIBUTE_VALUE seem to be equal and one of them could possibly be removed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mirasvit
Guru
 
Avatar
Total Posts:  639
Joined:  2009-08-22
 

Hi You can solve this problem using asynchronus queue. Check this one Fast Asynchronous Re-indexing http://mirasvit.com/magento-extensions/magento-asynchronous-reindex.html. After each product/category save this extension move reindex task to queue and process this queue as background process in cron.

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