本文主要是介绍magento 1.8 产品索引更新报错问题 修复,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
把更新失败的索引 ,加$e->getMessage() ,看看具体报什么错误
exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`your_database_name`.`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 DELETE CASCADE)’ in . ..\lib\Zend\Db\Statement\Pdo.php:228
Here is the solution.
You can execute these queries:
delete FROM `catalog_product_entity_datetime` where entity_id not in (select entity_id from catalog_product_entity);
delete FROM `catalog_product_entity_decimal` where entity_id not in (select entity_id from catalog_product_entity);
delete FROM `catalog_product_entity_gallery` where entity_id not in
这篇关于magento 1.8 产品索引更新报错问题 修复的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!