douwei7471 2012-03-31 22:38
浏览 69
已采纳

Magento 1.6 - 无法初始化索引器进程

I'm having problems reindexing the data in magento 1.6 through the admin panel. I just get a message saying

Cannot initialize the indexer process

and the products aren't displaying in the categories on the front end which is obviously a massive problem for the site.

I have tried running the process via shell but it throws the following error:

Category Products 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 (`strailco_firstclass`.`catalog_category_product_index`, CONSTRAINT `FK_CAT_CTGR_PRD_IDX_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity)' in /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/strailco/1stclassholidays.com/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#5 /home/strailco/1stclassholidays.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#6 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(176): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...')
#7 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Helper/Mysql4.php(48): Mage_Index_Model_Resource_Abstract->insertFromSelect(Object(Varien_Db_Select), 'catalog_categor...', Array, false)
#8 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(147): Mage_Index_Model_Resource_Helper_Mysql4->insertData(Object(Mage_Catalog_Model_Resource_Category_Indexer_Product), Object(Varien_Db_Select), 'catalog_categor...', Array, false)
#9 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(111): Mage_Index_Model_Resource_Abstract->insertFromTable('catalog_categor...', 'catalog_categor...', false)
#10 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(929): Mage_Index_Model_Resource_Abstract->syncData()
#11 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(132): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#12 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Process.php(166): Mage_Index_Model_Indexer_Abstract->reindexAll()
#13 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Process.php(194): Mage_Index_Model_Process->reindexAll()
#14 /home/strailco/1stclassholidays.com/html/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#15 /home/strailco/1stclassholidays.com/html/shell/indexer.php(198): Mage_Shell_Compiler->run()
#16 {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 (`strailco_firstclass`.`catalog_category_product_index`, CONSTRAINT `FK_CAT_CTGR_PRD_IDX_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity)' in /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /home/strailco/1stclassholidays.com/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /home/strailco/1stclassholidays.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(176): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...')
#6 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Helper/Mysql4.php(48): Mage_Index_Model_Resource_Abstract->insertFromSelect(Object(Varien_Db_Select), 'catalog_categor...', Array, false)
#7 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(147): Mage_Index_Model_Resource_Helper_Mysql4->insertData(Object(Mage_Catalog_Model_Resource_Category_Indexer_Product), Object(Varien_Db_Select), 'catalog_categor...', Array, false)
#8 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(111): Mage_Index_Model_Resource_Abstract->insertFromTable('catalog_categor...', 'catalog_categor...', false)
#9 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(929): Mage_Index_Model_Resource_Abstract->syncData()
#10 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(132): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#11 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Process.php(166): Mage_Index_Model_Indexer_Abstract->reindexAll()
#12 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Process.php(194): Mage_Index_Model_Process->reindexAll()
#13 /home/strailco/1stclassholidays.com/html/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#14 /home/strailco/1stclassholidays.com/html/shell/indexer.php(198): Mage_Shell_Compiler->run()
#15 {main}

I have tried deleting the lock files with no success.

Does anyone have ant idea what the problem might be as I'm stuck and need it resolving asap

Many Thanks in advance

  • 写回答

2条回答 默认 最新

  • doulu6234 2012-04-01 00:36
    关注

    Follow this chain of information and you may find an answer.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程