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 in product duplication
 
petertufan
Sr. Member
 
Avatar
Total Posts:  93
Joined:  2007-08-31
Ashburn, VA
 

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento/catalog_product_store`, CONSTRAINT `FK_CATALOG_PRDUCT_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE)

temporary fix: once changing the description or anything else and pressing the Save and Continue Edit button - error dissapears and everything
is normal.

Question to Magento Team: any quick fix for this????

 
Magento Community Magento Community
Magento Community
Magento Community
 
reiner23fx
Jr. Member
 
Total Posts:  5
Joined:  2007-09-11
 

I’m having the exact same problem ...
any idea what this could be?

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

Could you please list issue reproduction steps?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
reiner23fx
Jr. Member
 
Total Posts:  5
Joined:  2007-09-11
 

actually there are not many steps ..
manage products->
edit any simple product ->
hit the duplicate button

then the error message

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`mydb/catalog_product_store`, CONSTRAINT `FK_CATALOG_PRDUCT_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE)

appears

system:
mysql : 5.0.45
php: PHP Version 5.2.4

i think this could cause the problem:
(from phpinfo() )
mysql
Client API version 4.1.12

not sure though

mysqli and pdo_mysql also client version 4.1.12 ...

mysqli
MysqlI Support enabled
Client API library version 4.1.12
Client API header version 4.1.12

pdo_mysql
PDO Driver for MySQL, client library version 4.1.12

 
Magento Community Magento Community
Magento Community
Magento Community
 
sticky
Sr. Member
 
Avatar
Total Posts:  76
Joined:  2007-09-05
UK
 

I’m getting this error on a local install of 0.6.14100. (MAMP Mac OSX) however an older version I have running online on some shared hosting, 0.6.12383 is working fine.

petertufan, reiner23fx, are you guys running local installs on you PC/Mac too?

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

same problem here when trying to import products!! Any help?

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

Help me Please?

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

..... someone?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ross
Guru
 
Avatar
Total Posts:  336
Joined:  2007-08-31
Scarborough, North Yorkshire, UK
 

I had lots of errors with Magento when there was a mismatch between the versions for MySQL client library and the MySQL server.  If, as mentioned above, your phpinfo() lists a different MySQL Client API version to what is used on your MySQL server, then update your client API so that it matches exactly.  If you still have a problem then it must be something else.

Also, nobody seemed to mention if they were running on Windows or Linux (also state your Magento version).

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