Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error when saving products. 
 
TechBundle
Member
 
Avatar
Total Posts:  51
Joined:  2008-03-26
 

I updated to the newest preview release, and thought everything was working fine, but apparently not.

Whenever I save a product, I get a blank screen with an error message. However, the changes actually go through. I can see the updated product on the frontend. The error screen is as follows:

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 (`sampledb01_magento/catalogindex_eav`, CONSTRAINT `FK_CATALOGINDEX_EAV_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE)' in /var/www/vhosts/my-website.com/httpdocs/lib/Zend/Db/Statement/Pdo.php:238 Stack trace#0 /var/www/vhosts/my-website.com/httpdocs/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array) #1 /var/www/vhosts/my-website.com/httpdocs/lib/Zend/Db/Adapter/Abstract.php(406): Zend_Db_Statement->execute(Array) #2 /var/www/vhosts/my-website.com/httpdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) #3 /var/www/vhosts/my-website.com/httpdocs/lib/Zend/Db/Adapter/Abstract.php(484): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) #4 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer/Abstract.php(44): Zend_Db_Adapter_Abstract->insert('catalogindex_ea...', Array) #5 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer/Abstract.php(35): Mage_CatalogIndex_Model_Mysql4_Indexer_Abstract->_executeReplace(Array, '1', '65') #6 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/CatalogIndex/Model/Indexer/Abstract.php(79): Mage_CatalogIndex_Model_Mysql4_Indexer_Abstract->saveIndices(Array, '1', '65') #7 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/CatalogIndex/Model/Indexer/Abstract.php(60): Mage_CatalogIndex_Model_Indexer_Abstract->saveIndices(Array, '1', '65') #8 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/CatalogIndex/Model/Indexer.php(178): Mage_CatalogIndex_Model_Indexer_Abstract->processAfterSave(Object(Mage_Catalog_Model_Product)) #9 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/CatalogIndex/Model/Indexer.php(167): Mage_CatalogIndex_Model_Indexer->_runIndexingProcess(Object(Mage_Catalog_Model_Product)) #10 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/CatalogIndex/Model/Observer.php(37): Mage_CatalogIndex_Model_Indexer->index(Object(Mage_Catalog_Model_Product)) #11 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Model/App.php(975): Mage_CatalogIndex_Model_Observer->processAfterSaveEvent(Object(Varien_Event_Observer)) #12 /var/www/vhosts/my-website.com/httpdocs/app/Mage.php(273): Mage_Core_Model_App->dispatchEvent('catalog_product...', Array) #13 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Model/Abstract.php(259): Mage::dispatchEvent('catalog_product...', Array) #14 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Catalog/Model/Product.php(268): Mage_Core_Model_Abstract->_afterSave() #15 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Model/Abstract.php(228): Mage_Catalog_Model_Product->_afterSave() #16 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(322): Mage_Core_Model_Abstract->save() #17 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(341): Mage_Adminhtml_Catalog_ProductController->saveAction() #18 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(141): Mage_Core_Controller_Varien_Action->dispatch('save') #19 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(147): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http)) #20 /var/www/vhosts/my-website.com/httpdocs/app/Mage.php(421): Mage_Core_Controller_Varien_Front->dispatch() #21 /var/www/vhosts/my-website.com/httpdocs/index.php(29): Mage::run('default') #22 {main}

exception 'Zend_Controller_Response_Exception' with message 'Cannot send headers; headers already sent in /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php, line 345' in /var/www/vhosts/my-website.com/httpdocs/lib/Zend/Controller/Response/Abstract.php:281
Stack trace
:
#0 /var/www/vhosts/my-website.com/httpdocs/lib/Zend/Controller/Response/Abstract.php(147): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Adminhtml/Controller/Action.php(224): Zend_Controller_Response_Abstract->setRedirect('http://72.47.21...')
#2 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(355): Mage_Adminhtml_Controller_Action->_redirect('*/*/edit', Array)
#3 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(341): Mage_Adminhtml_Catalog_ProductController->saveAction()
#4 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(141): Mage_Core_Controller_Varien_Action->dispatch('save')
#5 /var/www/vhosts/my-website.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(147): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#6 /var/www/vhosts/my-website.com/httpdocs/app/Mage.php(421): Mage_Core_Controller_Varien_Front->dispatch()
#7 /var/www/vhosts/my-website.com/httpdocs/index.php(29): Mage::run('default')
#8 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
TechBundle
Member
 
Avatar
Total Posts:  51
Joined:  2008-03-26
 

I went in and did a 0.9 install from scratch, connected it to my original database from 0.8, and still get the same error that I was getting in an upgrade install.

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