1

I can no longer get magento to reindex correctly as it states there was a problem with the reindexing process. I have used SSH access to try and manually reindex the data. Using SSH access i see the error but unsure as to how to resolve the error log is below.

'pdoexception' with message 'SQLSTATE [23000] : Intergrity constraints violation; 1452 cannot add or update a child row: a foreign key constraint fails ....... <result 2 when explaing filename '#sql-c45_91e313'>, CONSTRAINT 'FK_MAGE_MAGE_CAT_PRD_FLAT_1_ENTT_ID_MAGE_CAT_PRD_ENTT_ENTT_ID' FOREIGN KEY ('entity_id') REFERENCES 'mage_ca)' in home/.../public_html/lib/Zend/Db/Statement/Pdo.php:228

Any help would be appreciated

user1220486
  • 101
  • 3
  • 11

2 Answers2

2

Try delete all product flat tables. They will be recreated by indexer.

Dmytro Zavalkin
  • 5,265
  • 1
  • 30
  • 34
0

Have you tried disabling Flat_catalog_category and Flat_catlaog_product and then truncating the catalog_product_flat tables.Be sure to disable foreign key constraints checks by doing SET FOREIGN_KEY_CHECKS = 0; before truncating. Once doing that you should be able to manually reindex via ssh . A well documented solution for this issue is here : http://binarythoughts21.blogspot.in/2013/12/reindexing-problems-in-magento.html

Akshay
  • 783
  • 6
  • 20