Magento Forum

   
Category Product Index will not rebuild after adding new Store & Store View
 
Optimaximal
Jr. Member
 
Total Posts:  1
Joined:  2009-12-07
Street, Somerset
 

I’m not sure where i’m going wrong, but when I add a new store & store view to my site, the Category Product reindexer fails. 

Backend shows a generic ‘There was a problem with reindexing process.’ error, but the dump from running indexer.php -reindex catalog_category_product is as follows:

Category Products index process unknown error:
exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1-52525’ for key ‘UNQ_CATEGORY_PRODUCT’’ in /Applications/MAMP/htdocs/walktall/app/code/local/Zend/Db/Statement/Pdo.php:232
Stack trace:
#0 /Applications/MAMP/htdocs/walktall/app/code/local/Zend/Db/Statement/Pdo.php(232): PDOStatement->execute(Array)
#1 /Applications/MAMP/htdocs/walktall/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /Applications/MAMP/htdocs/walktall/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /Applications/MAMP/htdocs/walktall/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO cat...’, Array)
#4 /Applications/MAMP/htdocs/walktall/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO cat...’, Array)
#5 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(170): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO cat...’)
#6 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(141): Mage_Index_Model_Mysql4_Abstract->insertFromSelect(’SELECT * FROM c...’, ‘catalog_categor...’, Array, false)
#7 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(95): Mage_Index_Model_Mysql4_Abstract->insertFromTable(’catalog_categor...’, ‘catalog_categor...’, false)
#8 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php(766): Mage_Index_Model_Mysql4_Abstract->syncData()
#9 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Indexer/Abstract.php(125): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Indexer_Product->reindexAll()
#10 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Process.php(139): Mage_Index_Model_Indexer_Abstract->reindexAll()
#11 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#12 /Applications/MAMP/htdocs/walktall/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#13 /Applications/MAMP/htdocs/walktall/shell/indexer.php(198): Mage_Shell_Compiler->run()
#14 {main}

Next exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1-52525’ for key ‘UNQ_CATEGORY_PRODUCT’’ in /Applications/MAMP/htdocs/walktall/app/code/local/Zend/Db/Statement/Pdo.php:242
Stack trace:
#0 /Applications/MAMP/htdocs/walktall/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /Applications/MAMP/htdocs/walktall/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /Applications/MAMP/htdocs/walktall/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO cat...’, Array)
#3 /Applications/MAMP/htdocs/walktall/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO cat...’, Array)
#4 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(170): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO cat...’)
#5 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(141): Mage_Index_Model_Mysql4_Abstract->insertFromSelect(’SELECT * FROM c...’, ‘catalog_categor...’, Array, false)
#6 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(95): Mage_Index_Model_Mysql4_Abstract->insertFromTable(’catalog_categor...’, ‘catalog_categor...’, false)
#7 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php(766): Mage_Index_Model_Mysql4_Abstract->syncData()
#8 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Indexer/Abstract.php(125): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Indexer_Product->reindexAll()
#9 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Process.php(139): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /Applications/MAMP/htdocs/walktall/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#11 /Applications/MAMP/htdocs/walktall/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#12 /Applications/MAMP/htdocs/walktall/shell/indexer.php(198): Mage_Shell_Compiler->run()
#13 {main}

All help appreciated!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top