can anyone tell me why I get the follow error when I reindex the catalog product index price reindex all cronjob.
---EXCEPTION--- exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`dumco_preinstalled_magento`.`catalog_product_index_tier_price`, CONSTRAINT `FK_CAT_PRD_IDX_TIER_PRICE_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entit)' in /data/web/public/lib/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /data/web/public/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /data/web/public/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) #2 /data/web/public/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array) #3 /data/web/public/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #4 /data/web/public/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) #5 /data/web/public/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) #6 /data/web/public/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(455): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...') #7 /data/web/public/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(379): Mage_Catalog_Model_Resource_Product_Indexer_Price->_prepareTierPriceIndex() #8 /data/web/public/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll() #9 /data/web/public/app/code/core/Mage/Index/Model/Process.php(212): Mage_Index_Model_Indexer_Abstract->reindexAll() #10 /data/web/public/app/code/core/Mage/Catalog/Model/Observer.php(203): Mage_Index_Model_Process->reindexAll() #11 [internal function]: Mage_Catalog_Model_Observer->reindexProductPrices(Object(Aoe_Scheduler_Model_Schedule)) #12 /data/web/public/app/code/community/Aoe/Scheduler/Model/Schedule.php(213): call_user_func_array(Array, Array) #13 /data/web/public/app/code/community/Aoe/Scheduler/Model/Schedule.php(604): Aoe_Scheduler_Model_Schedule->runNow(true) #14 /data/web/public/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process() #15 /data/web/public/app/code/core/Mage/Core/Model/App.php(1357): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer)) #16 /data/web/public/app/code/core/Mage/Core/Model/App.php(1336): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer)) #17 /data/web/public/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array) #18 /data/web/public/cron.php(77): Mage::dispatchEvent('default') #19 {main} Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`dumco_preinstalled_magento`.`catalog_product_index_tier_price`, CONSTRAINT `FK_CAT_PRD_IDX_TIER_PRICE_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entit), query was: INSERT INTO `catalog_product_index_tier_price` SELECT `tp`.`entity_id`, `cg`.`customer_group_id`, `cw`.`website_id`, MIN(IF(tp.website_id = 0, ROUND(tp.value * cwd.rate, 4), tp.value)) FROM `catalog_product_entity_tier_price` AS `tp` INNER JOIN `customer_group` AS `cg` ON tp.all_groups = 1 OR (tp.all_groups = 0 AND tp.customer_group_id = cg.customer_group_id) INNER JOIN `core_website` AS `cw` ON tp.website_id = 0 OR tp.website_id = cw.website_id INNER JOIN `catalog_product_index_website` AS `cwd` ON cw.website_id = cwd.website_id WHERE (cw.website_id != 0) GROUP BY `tp`.`entity_id`, `cg`.`customer_group_id`, `cw`.`website_id` ON DUPLICATE KEY UPDATE `min_price` = VALUES(`min_price`)' in /data/web/public/lib/Zend/Db/Statement/Pdo.php:235 Stack trace: #0 /data/web/public/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) #1 /data/web/public/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array) #2 /data/web/public/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #3 /data/web/public/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) #4 /data/web/public/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) #5 /data/web/public/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(455): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...') #6 /data/web/public/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(379): Mage_Catalog_Model_Resource_Product_Indexer_Price->_prepareTierPriceIndex() #7 /data/web/public/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll() #8 /data/web/public/app/code/core/Mage/Index/Model/Process.php(212): Mage_Index_Model_Indexer_Abstract->reindexAll() #9 /data/web/public/app/code/core/Mage/Catalog/Model/Observer.php(203): Mage_Index_Model_Process->reindexAll() #10 [internal function]: Mage_Catalog_Model_Observer->reindexProductPrices(Object(Aoe_Scheduler_Model_Schedule)) #11 /data/web/public/app/code/community/Aoe/Scheduler/Model/Schedule.php(213): call_user_func_array(Array, Array) #12 /data/web/public/app/code/community/Aoe/Scheduler/Model/Schedule.php(604): Aoe_Scheduler_Model_Schedule->runNow(true) #13 /data/web/public/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process() #14 /data/web/public/app/code/core/Mage/Core/Model/App.php(1357): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer)) #15 /data/web/public/app/code/core/Mage/Core/Model/App.php(1336): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer)) #16 /data/web/public/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array) #17 /data/web/public/cron.php(77): Mage::dispatchEvent('default') #18 {main}
Thanks for the support.
Best regards,
Michel