Magento Reindex CONSTRAINT

Magento Reindex CONSTRAINT - SQL/NoSQL - Programmation

Marsh Posté le 22-01-2016 à 11:40:22    

Bonjour,
J'ai la réindexation de mon flat catalogue qui ne fonctionne plus.
J'ai bien vu les conseils de stackoverflow qui disent de truncate les tables (avec et sans désactiver le flat catalogue) mais sans succès, j'ai même été jusqu’à supprimer recréer les tables mais sans plus de succès.
Voila le message d'erreur avec le stack quand je fait une réindexation en SSH :

Code :
  1. php shell/indexer.php --reindex catalog_product_flat
  2. Product Flat Data index process unknown error:
  3. exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento_1_8`.`#sql-2ea2_12feaf`, CONSTRAINT `FK_CAT_PRD_FLAT_8_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON U)' in /var/www/vhosts/domain.tld/httpdocs/magento/lib/Zend/Db/Statement/Pdo.php:228
  4. Stack trace:
  5. #0 /var/www/vhosts/domain.tld/httpdocs/magento/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
  6. #1 /var/www/vhosts/domain.tld/httpdocs/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
  7. #2 /var/www/vhosts/domain.tld/httpdocs/magento/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
  8. #3 /var/www/vhosts/domain.tld/httpdocs/magento/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
  9. #4 /var/www/vhosts/domain.tld/httpdocs/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
  10. #5 /var/www/vhosts/domain.tld/httpdocs/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
  11. #6 /var/www/vhosts/domain.tld/httpdocs/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(347): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
  12. #7 /var/www/vhosts/domain.tld/httpdocs/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(2731): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')
  13. #8 /var/www/vhosts/domain.tld/httpdocs/magento/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(815): Varien_Db_Adapter_Pdo_Mysql->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')
  14. #9 /var/www/vhosts/domain.tld/httpdocs/magento/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(1389): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(8)
  15. #10 /var/www/vhosts/domain.tld/httpdocs/magento/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296): Mage_Catalog_Model_Resource_Product_Flat_Indexer->reindexAll()
  16. #11 /var/www/vhosts/domain.tld/httpdocs/magento/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(350): Mage_Catalog_Model_Product_Flat_Indexer->reindexAll()
  17. #12 /var/www/vhosts/domain.tld/httpdocs/magento/app/code/core/Mage/Index/Model/Process.php(210): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
  18. #13 /var/www/vhosts/domain.tld/httpdocs/magento/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
  19. #14 /var/www/vhosts/domain.tld/httpdocs/magento/shell/indexer.php(166): Mage_Index_Model_Process->reindexEverything()
  20. #15 /var/www/vhosts/domain.tld/httpdocs/magento/shell/indexer.php(212): Mage_Shell_Compiler->run()
  21. #16 {main}


Si quelqu'un pouvait m'aider à débuger ça ce serait vraiment pas du luxe ! :- /


---------------
D3
Reply

Marsh Posté le 22-01-2016 à 11:40:22   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed