导入多选产品属性后,当我尝试从 magento admin 重新索引时,索引器显示错误。 “重新索引过程存在问题。”
异常日志:
2012-12-05T12:21:36+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '185-154-1-843' for key 'PRIMARY'
Trace: #0 /opt/lampp/htdocs/mise/lib/Varien/Db/Statement/Pdo/Mysql.php(111): Zend_Db_Statement_Pdo->_execute(Array)
#1 /opt/lampp/htdocs/mise/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /opt/lampp/htdocs/mise/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /opt/lampp/htdocs/mise/lib/Zend/Db/Adapter/Pdo/Abstract.php(239): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /opt/lampp/htdocs/mise/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /opt/lampp/htdocs/mise/lib/Varien/Db/Adapter/Pdo/Mysql.php(1974): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#6 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(276): Varien_Db_Adapter_Pdo_Mysql->insertArray('catalog_product...', Array, Array)
#7 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(257): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source->_saveIndexData(Array)
#8 /opt/lampp/htdocs/mise/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 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php(50): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source->_prepareIndex()
#10 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php(185): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract->reindexAll()
#11 /opt/lampp/htdocs/mise/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Eav->reindexAll()
#12 /opt/lampp/htdocs/mise/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#13 /opt/lampp/htdocs/mise/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#14 /opt/lampp/htdocs/mise/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#15 /opt/lampp/htdocs/mise/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#16 /opt/lampp/htdocs/mise/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#17 /opt/lampp/htdocs/mise/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /opt/lampp/htdocs/mise/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 /opt/lampp/htdocs/mise/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#20 /opt/lampp/htdocs/mise/index.php(87): Mage::run('', 'store')
#21 {main}
产品导入文件仅包含 2 列 sku 和属性值
我也尝试使用自定义 php 代码手动导入。同样的错误……!!!
我认为 '185-154-1-843' 中的 185 是产品 ID。所以我去了管理员,只是保存了产品和解决该产品的错误,但它显示另一个产品的重复条目。:(
请帮忙