Magento Product Flat Data – reindex error

When you get the error:

Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`sprayfoa_store`.<result 2 when explaining filename '#sql-66c_ab044'>, CONSTRAINT `FK_CAT_PRD_FLAT_1_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity`)' in ...
Stack trace:

Try to truncate all the category_flat_product_x tables in phpmyadmin and then reindex again.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top