5

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?

3
  • 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
    Commented Dec 28, 2016 at 9:04
  • You can use putty instead of using default re-indexing
    – Gem
    Commented Dec 29, 2016 at 11:17
  • I am using console already Commented Dec 29, 2016 at 11:18

1 Answer 1

1
+50

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 and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.