1

これは以前に投稿された質問と同じだと誰もが思っていることは知っていますが、他の回答を試しました

Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation:         1452 Cannot add or update a child row: a f     oreign key constraint fails (`Riders`.    <result 2 when explaining filename '#sql-634_21fc81'>, CONSTRAINT    `FK_CAT_PRD_FLAT_1_ENTT_ID     _CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`enti)' in /home/.sites/143/site2/web/lib/Ze         nd/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/.sites/143/site2/web/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement- >execute(Array)
#1 /home/.sites/143/site2/web/lib/Varien/Db/Statement/Pdo/Mysql.php(110):  Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/.sites/143/site2/web/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/.sites/143/site2/web/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/.sites/143/site2/web/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Arr     ay)
#5 /home/.sites/143/site2/web/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...',      Array)
#6 /home/.sites/143/site2/web/lib/Varien/Db/Adapter/Pdo/Mysql.php(340): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#7 /home/.sites/143/site2/web/lib/Varien/Db/Adapter/Pdo/Mysql.php(2569): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca..     .')
#8 /home/.sites/143/site2/web/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.p    hp(816): Varien_Db_Adapter_Pdo_Mysql     ->addForeignKey('FK_CAT_PRD_FLAT...',   'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')
#9 /home/.sites/143/site2/web/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.p    hp(1390): Mage_Catalog_Model_Resourc     e_Product_Flat_Indexer->prepareFlatTable(1)
#10  /home/.sites/143/site2/web/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296):    Mage_Catalog_Model_Resource_Product     _Flat_Indexer->reindexAll()
#11 /home/.sites/143/site2/web/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(336):  Mage_Catalog_Model_Product_Flat_Ind     exer->reindexAll()
#12 /home/.sites/143/site2/web/app/code/core/Mage/Index/Model/Process.php(209): Mage_Catalog_Model_Product_Indexer_Flat->reindexAl     l()
#13 /home/.sites/143/site2/web/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#14 /home/.sites/143/site2/web/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#15 /home/.sites/143/site2/web/shell/indexer.php(198): Mage_Shell_Compiler->run()
#16 {main}

カタログ製品エンティティには存在するが、カタログ カテゴリ製品には存在しないすべての行を削除しました。データベース修復ツールも実行しました。データベースが壊れていないと表示されます。また、テーブルを切り捨ててみました。それらのどれも問題を解決していません。

現在、catalog_product_flat テーブルは空です。

他に何を試すべきかわかりませんが、プロジェクトの次の部分に進むには、このエラーを修正する必要があります。ゼロから始めるのは大歓迎ですが、これはライブ製品と注文が進行中のライブサイトです.

アドバイスやヘルプをいただければ幸いです。

4

2 に答える 2

4
  1. var/locks/ にあるすべてのロックを削除します
  2. データベースで、catalog_product_flat_ で始まるすべてのテーブルを削除します。
  3. ターミナル (コマンド ライン) で、シェル フォルダーに移動します。
  4. php indexer.php --reindexall を実行します。
于 2013-08-09T22:19:01.857 に答える