Magento Forum

   
Upgraded from 1.4.1 to 1.5.1 - Now cannot re-index Category Products
 
M1_Rootform
Member
 
Total Posts:  46
Joined:  2008-04-17
 

Hello. I’ve tried everything I can thing of and all suggestions i’ve come across in forums.

Here is the error I am receiving:

Exception message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`dbname_mage2/ehbj_catalog_category_product_index`, CONSTRAINT `FK_CATALOG_CATEGORY_PROD_IDX_CATEGORY_ENTITY` FOREIGN KEY (`category_id`) REFERENCES `ehbj_catalog_category_entity`.....

Everything with the upgrade went so smooth it seemed. All other indexes will re-index accept the Category Products index. Please advise.

 
Magento Community Magento Community
Magento Community
Magento Community
 
M1_Rootform
Member
 
Total Posts:  46
Joined:  2008-04-17
 

I performed the upgrade on a copy of my clients store via ssh - not Magento Connect. But, great news! Right after I posted this I came across this post http://www.magentocommerce.com/boards/viewthread/224211/ - opened the SQL dump as explained by SimpleHelix response. I deleted just the Foreign Key constraint for catalog_category_product_index table at the bottom of the sql file. I was able to re-index Category Products and all is well so far!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top