Magento Forum

   
Cannot reindex product catalog after upgrading
 
diybrewing
Jr. Member
 
Total Posts:  26
Joined:  2008-11-06
 

Hi
On my production server I upgraded t o1.4.2 from 1.4.1 and when I tried to reindex catalog products I get an error and this message in the exception log
2010-12-11T20:46:25+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`brewmast_magento`.`catalog_category_product_index`, CONSTRAINT `FK_CATALOG_CATEGORY_PROD_IDX_CATEGORY_ENTITY` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON)
Trace: #0 /home/brewmast/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/brewmast/public_html/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 /home/brewmast/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO cat...’, Array)
#3 /home/brewmast/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO cat...’, Array)
#4 /home/brewmast/public_html/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(159): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO cat...’)
#5 /home/brewmast/public_html/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(134): Mage_Index_Model_Mysql4_Abstract->insertFromSelect(’SELECT * FROM c...’, ‘catalog_categor...’, Array, false)
#6 /home/brewmast/public_html/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(88): Mage_Index_Model_Mysql4_Abstract->insertFromTable(’catalog_categor...’, ‘catalog_categor...’, false)
#7 /home/brewmast/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php(598): Mage_Index_Model_Mysql4_Abstract->syncData()
#8 /home/brewmast/public_html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(125): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Indexer_Product->reindexAll()
#9 /home/brewmast/public_html/app/code/core/Mage/Index/Model/Process.php(139): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /home/brewmast/public_html/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#11 /home/brewmast/public_html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#12 /home/brewmast/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#13 /home/brewmast/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch(’reindexProcess’)
#14 /home/brewmast/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /home/brewmast/public_html/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#16 /home/brewmast/public_html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#17 /home/brewmast/public_html/index.php(78): Mage::run(’’, ‘store’)
#18 {main}

I can add products with no problem but now I cannot see any products in the frontend.
Does anyone have any ideas what the problem is
The website is diybrewing.com
Thanks for your help

 
Magento Community Magento Community
Magento Community
Magento Community
 
furnitureforyoultd
Enthusiast
 
Total Posts:  833
Joined:  2009-03-09
 

http://www.magentocommerce.com/boards/viewthread/214233/#t286577

 
Magento Community Magento Community
Magento Community
Magento Community
 
diybrewing
Jr. Member
 
Total Posts:  26
Joined:  2008-11-06
 

Thanks that worked perfect.
I tried it before I posted but that database must have been corrupted too. Everything works perfect now.

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