On re-indexing product attribute I have found below error :

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (xxxxxxx.catalog_product_index_eav, CONSTRAINT FK_CAT_PRD_IDX_EAV_ENTT_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (entity_id) REFERENCES catalog_product_entity (entity_id) ON DELE), query was: INSERT INTO catalog_product_index_eav (entity_id, attribute_id, store_id, value) SELECT catalog_product_index_eav_idx.entity_id, catalog_product_index_eav_idx.attribute_id, catalog_product_index_eav_idx.store_id, catalog_product_index_eav_idx.value FROM catalog_product_index_eav_idx ON DUPLICATE KEY UPDATE entity_id = VALUES(entity_id), attribute_id = VALUES(attribute_id), store_id = VALUES(store_id), value = VALUES(value)There was a problem with reindexing process.

Anyone has any suggestion?

  • disable the flat catalog, remove the tables catalog_product_flat_store_* if have, then try to process reIndexing and then enable flat tables again. – sandip Dec 28 '16 at 9:04
  • You can use putty instead of using default re-indexing – Gem Dec 29 '16 at 11:17
  • I am using console already – Ram Pratap Singh Gour Dec 29 '16 at 11:18

Follow this step

  1. Disable the flat catalog, remove the tables catalog_product_flat_store_

  2. Reindex

  3. And enable flat tables again.

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.