首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Magento Product平面数据索引错误

问Magento Product平面数据索引错误
EN

Stack Overflow用户
提问于 2015-07-12 21:06:15
回答 1查看 517关注 0票数 0

当我在shell中建立索引时,得到的结果如下所示。所有产品都以编程方式导入。在系统配置中启用了平面类别。

代码语言:javascript
复制
  Product Attributes index was rebuilt successfully in 00:00:02
  Product Prices index was rebuilt successfully in 00:00:03
  Catalog URL Rewrites index was rebuilt successfully in 00:00:33
  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 foreign key constraint fails (`ethnx29_apexdeal`.`#sql-1300_4369b8c`, CONSTRAINT       `FK_CAT_PRD_FLAT_1_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCAD)' in /home3/ethnx29/public_html/apexdeal.com/lib/Zend/Db/Statement/Pdo.php:228
  Stack trace:
  #0 /home3/ethnx29/public_html/apexdeal.com/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
  #1 /home3/ethnx29/public_html/apexdeal.com/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
  #2 /home3/ethnx29/public_html/apexdeal.com/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
  #3 /home3/ethnx29/public_html/apexdeal.com/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
  #4 /home3/ethnx29/public_html/apexdeal.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
  #5 /home3/ethnx29/public_html/apexdeal.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
  #6 /home3/ethnx29/public_html/apexdeal.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(347): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
  #7 /home3/ethnx29/public_html/apexdeal.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(2731): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')
  #8 /home3/ethnx29/public_html/apexdeal.com/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')
  #9 /home3/ethnx29/public_html/apexdeal.com/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(1389): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(1)
  #10 /home3/ethnx29/public_html/apexdeal.com/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296): Mage_Catalog_Model_Resource_Product_Flat_Indexer->reindexAll()
  #11 /home3/ethnx29/public_html/apexdeal.com/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(350): Mage_Catalog_Model_Product_Flat_Indexer->reindexAll()
  #12 /home3/ethnx29/public_html/apexdeal.com/app/code/core/Mage/Index/Model/Process.php(212): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
  #13 /home3/ethnx29/public_html/apexdeal.com/app/code/core/Mage/Index/Model/Process.php(260): Mage_Index_Model_Process->reindexAll()
  #14 /home3/ethnx29/public_html/apexdeal.com/shell/indexer.php(167): Mage_Index_Model_Process->reindexEverything()
  #15 /home3/ethnx29/public_html/apexdeal.com/shell/indexer.php(215): Mage_Shell_Compiler->run()
  #16 {main}
  Category Products index was rebuilt successfully in 00:00:04
  Catalog Search Index index was rebuilt successfully in 00:00:18
  Stock Status index was rebuilt successfully in 00:00:00
  Tag Aggregation Data index was rebuilt successfully in 00:00:00
EN

回答 1

Stack Overflow用户

发布于 2015-07-13 14:05:27

在重新编制索引之前,清除缓存并重命名平面数据表。它将使用正确的数据再次生成平面表

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31368075

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档