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

Problem with product import
 
talkaboutdesign
Member
 
Total Posts:  34
Joined:  2007-11-07
 

Problem saving the collectionabortingErrorSQLSTATE[23000]Integrity constraint violation1216 Cannot add or update a child rowa foreign key constraint fails
 
Magento Community Magento Community
Magento Community
Magento Community
 
Fidelity
Member
 
Avatar
Total Posts:  49
Joined:  2007-09-20
 

same problem here! I have the most recent version…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Fidelity
Member
 
Avatar
Total Posts:  49
Joined:  2007-09-20
 

Help please?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Fidelity
Member
 
Avatar
Total Posts:  49
Joined:  2007-09-20
 

Still no help…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Fidelity
Member
 
Avatar
Total Posts:  49
Joined:  2007-09-20
 

Please?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Fidelity
Member
 
Avatar
Total Posts:  49
Joined:  2007-09-20
 

.........

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

This is way too little information.
Please provide steps to reproduce this error.

Is this a full dump of the error message?

 
Magento Community Magento Community
Magento Community
Magento Community
 
JoshBelke
Member
 
Total Posts:  64
Joined:  2008-02-12
NY, NY
 

Blank Database: Import of SQL sample .0.8.17240

SQL query:
#1217 - Cannot delete or update a parent row: a foreign key constraint fails

5 tables have been made from the clean sample import.

admin_assert
admin_role
admin_rule
admin_user
catalog_catagory_entity

 
Magento Community Magento Community
Magento Community
Magento Community
 
option4
Jr. Member
 
Total Posts:  3
Joined:  2008-05-19
 

I am having similar issues. I did a fresh Magento install and then imported 1.100 products from OsCommerce. All the products are loading on the admin but they all were imported with Status disable. I had clear the cache (sometimes it gives me error) and when I try to enable the status of a product, I get the following error:

SQLSTATE[23000]: Integrity constraint violation: 1216 Cannot add or update a child row: a foreign key constraint fails
Trace:
#0 lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 lib/Zend/Db/Adapter/Abstract.php(406): Zend_Db_Statement->execute(Array)
#2 lib/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query(’INSERT INTO rd_...’, Array)
#3 app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer.php(495): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO rd_...’)
#4 app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer.php(502): Mage_CatalogIndex_Model_Mysql4_Indexer->_commitInsert(’catalogindex/mi...’, false)
#5 app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer.php(311): Mage_CatalogIndex_Model_Mysql4_Indexer->_insert(’catalogindex/mi...’, Array)
#6 app/code/core/Mage/CatalogIndex/Model/Indexer.php(365): Mage_CatalogIndex_Model_Mysql4_Indexer->reindexMinimalPrices(Array, Object(Mage_Core_Model_Store))
#7 app/code/core/Mage/Adminhtml/controllers/System/CacheController.php(73): Mage_CatalogIndex_Model_Indexer->plainReindex()
#8 app/code/core/Mage/Core/Controller/Varien/Action.php(342): Mage_Adminhtml_System_CacheController->saveAction()
#9 app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(148): Mage_Core_Controller_Varien_Action->dispatch(’save’)
#10 app/code/core/Mage/Core/Controller/Varien/Front.php(146): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#11 app/Mage.php(427): Mage_Core_Controller_Varien_Front->dispatch()
#12 index.php(40): Mage::run()
#13 {main}

Any help will be appreciated.

Thanks,

Joao

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