在集成一些产品后,我对reindex Magento CMS有问题。
这是来自shell reindex
的LOG /usr/home/sinusi/public_html/_duplicateshop/shell$ php indexer.php --status
产品属性索引流程未知错误: 异常' PDOException' with message' SQLSTATE [23000]:完整性约束违规:1062重复条目' 32363-974-1-327'关键' PRIMARY''在/usr/www/users/sinusi/_duplicateshop/lib/Zend/Db/Statement/Pdo.php:228 堆栈跟踪:
#0 /usr/www/users/sinusi/_duplicateshop/lib/Zend/Db/Statement/Pdo.php(228):PDOStatement-> execute(Array)
#1 /usr/www/users/sinusi/_duplicateshop/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo-> _execute(Array)
#2 /usr/www/users/sinusi/_duplicateshop/app/code/core/Zend/Db/Statement.php(291):Varien_Db_Statement_Pdo_Mysql-> _execute(Array)
#3 /usr/www/users/sinusi/_duplicateshop/lib/Zend/Db/Adapter/Abstract.php(480):Zend_Db_Statement-> execute(Array)
#4 /usr/www/users/sinusi/_duplicateshop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):Zend_Db_Adapter_Abstract->查询(' INSERT INTO`ca ... ',数组)
#5 /usr/www/users/sinusi/_duplicateshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(428):Zend_Db_Adapter_Pdo_Abstract->查询(' INSERT INTO`ca ... ',数组)
#6 /usr/www/users/sinusi/_duplicateshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(1998):Varien_Db_Adapter_Pdo_Mysql-> query(' INSERT INTO`ca ... ',数组)
#7 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(280):Varien_Db_Adapter_Pdo_Mysql-> insertArray(& #39; catalog_product ...',Array,Array)
#8 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(261):Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source-> _saveIndexData(Array )
#9 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(84):Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source-> _prepareMultiselectIndex(NULL) ,NULL)
#10 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php(50):Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source-> _prepareIndex()
#11 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php(185):Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract-> reindexAll()
#12 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143):Mage_Catalog_Model_Resource_Product_Indexer_Eav-> reindexAll()
#13 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Index/Model/Process.php(210):Mage_Index_Model_Indexer_Abstract-> reindexAll()
#14 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Index/Model/Process.php(258):Mage_Index_Model_Process-> reindexAll()
#15 /usr/www/users/sinusi/_duplicateshop/shell/indexer.php(166):Mage_Index_Model_Process-> reindexEverything()
#16 /usr/www/users/sinusi/_duplicateshop/shell/indexer.php(212):Mage_Shell_Compiler-> run()
#17 {main}
下一个例外' Zend_Db_Statement_Exception' with message' SQLSTATE [23000]:完整性约束违规:1062重复条目' 32363-974-1-327'关键' PRIMARY''在/usr/www/users/sinusi/_duplicateshop/lib/Zend/Db/Statement/Pdo.php:234 堆栈跟踪:
#0 /usr/www/users/sinusi/_duplicateshop/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo-> _execute(Array)
#1 /usr/www/users/sinusi/_duplicateshop/app/code/core/Zend/Db/Statement.php(291):Varien_Db_Statement_Pdo_Mysql-> _execute(Array)
#2 /usr/www/users/sinusi/_duplicateshop/lib/Zend/Db/Adapter/Abstract.php(480):Zend_Db_Statement-> execute(Array)
#3 /usr/www/users/sinusi/_duplicateshop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):Zend_Db_Adapter_Abstract->查询(' INSERT INTO`ca ... ',数组)
#4 /usr/www/users/sinusi/_duplicateshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(428):Zend_Db_Adapter_Pdo_Abstract->查询(' INSERT INTO`ca ... ',数组)
#5 /usr/www/users/sinusi/_duplicateshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(1998):Varien_Db_Adapter_Pdo_Mysql-> query(' INSERT INTO`ca ... ',数组)
#6 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(280):Varien_Db_Adapter_Pdo_Mysql-> insertArray(& #39; catalog_product ...',Array,Array)
#7 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(261):Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source-> _saveIndexData(Array )
#8 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(84):Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source-> _prepareMultiselectIndex(NULL) ,NULL)
#9 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php(50):Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source-> _prepareIndex()
#10 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php(185):Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract-> reindexAll()
#11 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143):Mage_Catalog_Model_Resource_Product_Indexer_Eav-> reindexAll()
#12 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Index/Model/Process.php(210):Mage_Index_Model_Indexer_Abstract-> reindexAll()
#13 /usr/www/users/sinusi/_duplicateshop/app/code/core/Mage/Index/Model/Process.php(258):Mage_Index_Model_Process-> reindexAll()
#14 /usr/www/users/sinusi/_duplicateshop/shell/indexer.php(166):Mage_Index_Model_Process-> reindexEverything()
#15 /usr/www/users/sinusi/_duplicateshop/shell/indexer.php(212):Mage_Shell_Compiler-> run()
#16 {main}
我截断了catalog_flats
并删除了锁定文件
但错误仍然相同
答案 0 :(得分:0)
首先,您可以尝试完全删除平面表,因为它们将通过索引过程重新创建。
您到达重复条目的事实可能意味着已从原始表中删除了唯一索引。也许一个产品属性在数据库中人为干预之后必须是数据库中两倍相同值的唯一属性。
如果你能确定有问题的领域,我可以扩展我的答案。
答案 1 :(得分:0)
尝试提供的解决方案 http://www.magikcommerce.com/blog/how-to-resolve-magento-reindexing-errors-in-your-magento-store/#
在运行此方法之前,请确保完整备份数据库。
答案 2 :(得分:0)
已解决 - 属性
中存在重复条目对不起我的问题,谢谢你的意见!