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

[Solved] Database Errors
 
Dunc
Member
 
Avatar
Total Posts:  56
Joined:  2008-08-05
 

I also posted one of these errors in the 1.1.7 upgrade problems, but now I have an extra one. I get the following error when trying to “Add to Google Base"…

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

and the following after saving a page in CMS…

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

I’m suspecting that the database didn’t update correctly through the upgrade but am unsure what to do to fix this. Any help would be appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dunc
Member
 
Avatar
Total Posts:  56
Joined:  2008-08-05
 

OK, so after a bit of searching I found the solution on a previous thread…

http://www.magentocommerce.com/boards/viewthread/13206/

The core_store table had to be of InnoDB type which I changed using MySQL Query browser, phew, glad that’s done.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tao326
Jr. Member
 
Total Posts:  1
Joined:  2008-08-07
 

Worked for me too! Many thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
WebhostUK LTD
Sr. Member
 
Avatar
Total Posts:  163
Joined:  2009-08-27
UK
 

Thank you to paste the solution..good to know your issue is resolved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
willamm
Jr. Member
 
Total Posts:  6
Joined:  2009-12-20
 

so you find the solution this is good and this is very good information for us it will be work for them who want this solution to upgrade magento1.1.8

thank you

________________________

Computer Registry Cleaner

 
Magento Community Magento Community
Magento Community
Magento Community
 
moggiex
Jr. Member
 
Total Posts:  10
Joined:  2009-11-09
 

I just had this too when deleting all the inventory, none of the fixes mentioned in this post or the one linked above resolved it, what was actually needed was a re index and switching the flat catalog to No in System > Config > Catalog > FrontEnd > Use Flat Catalog Category

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dannyz1984
Sr. Member
 
Avatar
Total Posts:  153
Joined:  2009-04-12
 

thanks the problem happens once in a while, its hard to predict what causes this because by default it is set to InnoDB

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