If you’re getting “There was a problem with reindexing process.” error and “Integrity constraint violation: 1452 Cannot add or update a child row” in your exception.log, it can be caused by missing table prefixes in Magento sample data dump.
Fortunately, there’s a way to fix it.
The actual error in the exeption log that can point to missing prefixes can look somewhat like this for Magento 1.6:
SQLSTATE: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
FK_CATINV_STOCK_STS_PRD_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (
If you check the error carefully, you’ll notice that
catalog_product_entity table is wrong and should be actually called
If you are using prefixes in your Magento installation, you should dump your database and check every corresponding operation for table prefixes. If it is indeed your issue, you should be able to fix it by adding all missing prefixes and importing your dump back in the database.
You might also want to use our Magento Sample Data Prefix Script to adapt Magento Sample Data for a prefixed Magento installation.
Latest posts by Martin Boze (see all)
- OpenCart with Journal2 and MultiMerch Marketplace - March 23, 2015
- Creating custom seller account fields in MultiMerch - February 12, 2015
- Merry Christmas from MultiMerch - December 24, 2014