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

Magento API SOAP v2 catalogProductCreate SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row `catalogrule_product`,
 
jaschamcdonald
Jr. Member
 
Total Posts:  1
Joined:  2011-10-19
 

Magento 1.12.0.2 Enterprise
Recently during API calls to catalogProductCreate I receive the following SQL error

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento2`.`catalogrule_product`, CONSTRAINT `FK_CATRULE_PRD_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDA)

I have no idea where to start troubleshooting this issue. I’ve done full re-index and still no help.
The product does in fact get added into Magento, but the SQL error tricks my system into thinking it failed and it then attempts again, creating a duplicate SKU.

I’ve removed all “Shopping Cart Price Rules” in an attempt to resolve this, but no help.

Anyone having similar issues?

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