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

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`spedanoc_mgn1`.`mgn_catalog_p
 
dankloost
Jr. Member
 
Total Posts:  1
Joined:  2011-03-28
 

I need some help - I am trying to import a CSV file and then it comes up with this

\\\\\\\\\\\\\\\"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`spedanoc_mgn1`.`mgn_catalog_product_entity_media_gallery`, CONSTRAINT `FK_CC3E59B6D504D43299C37008693FCE36` FOREIGN KEY (`attribute_id`) REFERENCES `mgn_eav_attribute` (`attribute_id`) ON DEL)\\\\\\\\\\\\\\\”

I dont know anything about the SQL stuff so please guide me with what to do.

thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Store_Manager
Enthusiast
 
Avatar
Total Posts:  867
Joined:  2012-07-09
 

Hello,

The error means that the tool that your’e using is trying to insert or delete value that conflicts with its parent value. Let me explain it easier.

For example the tool tries to insert some image name into media gallery for product with ID 999, but product with ID 999 doesn’t exist in the database.

Most likely it is one-time error as it shouldn’t remain.

In case it remains, and you cannot import any products, I can offer you to try another solution:
http://www.magentocommerce.com/magento-connect/store-manager-for-magento.html
to import same products. There’s free trial available, so you’re welcome to check it for free.

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