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

Page 2 of 3
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`irciycom_magento/weee_discoun
 
markf
Sr. Member
 
Total Posts:  145
Joined:  2007-09-20
 
kulimuli - 02 February 2009 11:11 AM

Hi,

in phpmyadmin go to a table, in my case “catalog_category_entity_varchar” in the midle of the right frame, i click the button “relation view”.

i attached a screenshot with my rerlations

Hmm, interesting.  I checked in my database using the same table and none of the relationships existed… I am looking at a 1.1.8 database so I’m not sure if that makes a difference.

Is there a way to fix all the relationships?

PS Thanks very much for all your help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kulimuli
Sr. Member
 
Total Posts:  151
Joined:  2008-03-31
Linz, Oberösterreich
 

Hallo,

See Post #6
The Step converting to innodb is not required wenn your tables are in innodb

The File Name beziehungen is in english relationships

 
Magento Community Magento Community
Magento Community
Magento Community
 
turbo1
Sr. Member
 
Avatar
Total Posts:  296
Joined:  2008-08-19
Los Angeles, CA
 

The innodb fix was posted 6 weeks ago -

http://www.magentocommerce.com/boards/viewthread/26356/#t86703

And even months before that, by a Varien team member.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kulimuli
Sr. Member
 
Total Posts:  151
Joined:  2008-03-31
Linz, Oberösterreich
 

hi turbo1

but this fix in your posted thread, dosn’t create’s the releations and dont cleanup corrupt data…

greetings form austria
kulimuli

 
Magento Community Magento Community
Magento Community
Magento Community
 
kulimuli
Sr. Member
 
Total Posts:  151
Joined:  2008-03-31
Linz, Oberösterreich
 

Hi markf ,

could you fix your issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
herve@wsa
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-22
United Kingdom
 

Hi,

last time I had similar issues, I removed some CONSTRAINT in the database. I did backup my database (the site was not live). Did remove the constraint that I thought was redundant with the code: I mean the code was looking after the integrity of the data already and therefore the constraint was obsolete.

I tested my site to make sure I did not break anything at the other end of the site. It did appear to make the trick.

Hope it gives you ideas.

 
Magento Community Magento Community
Magento Community
Magento Community
 
markf
Sr. Member
 
Total Posts:  145
Joined:  2007-09-20
 
kulimuli - 05 February 2009 01:26 AM

Hi markf ,

could you fix your issue?

Kulimuli,

i was able to fix some of the errors, but not all.  the relationship view tip was very helpful, i did not know that was there.  i had many relationships that were not there that should be. 

However, i just found out today that Magento is releasing a “Database repair tool” that is supposed to address this and other problems.  So I am waiting for that to come out, Michael of varian said it will be coming in a few days.  Looking forward to that.  Thanks again for all your help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
j2tdesign
Sr. Member
 
Avatar
Total Posts:  208
Joined:  2008-07-16
France
 

Hello,

Have you tried to rebuild the search index?
System >> cache >> rebuild search index

Jon

 
Magento Community Magento Community
Magento Community
Magento Community
 
kanixd
Jr. Member
 
Total Posts:  10
Joined:  2008-09-17
 
markf - 09 February 2009 11:45 AM

Kulimuli,

i was able to fix some of the errors, but not all.  the relationship view tip was very helpful, i did not know that was there.  i had many relationships that were not there that should be. 

However, i just found out today that Magento is releasing a “Database repair tool” that is supposed to address this and other problems.  So I am waiting for that to come out, Michael of varian said it will be coming in a few days.  Looking forward to that.  Thanks again for all your help!

Hi, Could you please provide some more info about this tool? I’m having the same issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
markf
Sr. Member
 
Total Posts:  145
Joined:  2007-09-20
 

I have no further info just that its coming out in a few days supposedly..

 
Magento Community Magento Community
Magento Community
Magento Community
 
B00MER
Sr. Member
 
Avatar
Total Posts:  130
Joined:  2007-12-27
DFW, TX
 
kulimuli - 22 January 2009 11:17 AM

Hi, i found the error,

It seems this error is from an incorrect deleted product..., because in the table weee_discount are only lines till an incomplete (because deleted) existing product.
I restored my old database/website and search through all tableds with a “product_id” raw with following query (the catalog_category_product_index must be 2 times adjusted for each query). I deleted the reported lines.

After this the Update was successful.

SELECT
  
*
FROM
  catalog_category_product_index
LEFT
  JOIN
    catalog_product_entity
    ON catalog_category_product_index
.product_id catalog_product_entity.entity_id
WHERE
  catalog_product_entity
.entity_id IS NULL

Thanks this helped me fixed the wee_discount constraint error!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kyubii
Jr. Member
 
Total Posts:  20
Joined:  2009-04-16
 

Rebuild Search Index

-> that really do the trick. I have no such error after rebuild search index.

I use 1.3.1 and InnoDB.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dvmada
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-06-18
Antananarivo, Madagascar
 

Rebuild Search Index works perfectly.
No more errors after this.

But why it happened ?
The Search Index must be rebuild by the cron every night or something ?

Is there Magento tools to check DB integrity and repair it ?

Thanks

Magento 1.3.1 and MyISAM / InnoDB

 
Magento Community Magento Community
Magento Community
Magento Community
 
israelibadamm
Sr. Member
 
Total Posts:  86
Joined:  2007-12-10
 

I am also receiving this error,
It started happening exactly after i regenerated the Google Sitemap.
Unfortunately when i try doing the search index rebuild i am getting this:

Search Index rebuild errorPlease try again later

Now i always got this feeling that magneto can not handle the amount of products we have on our site (around 5000)
It seems like the server always times out or just stops working.

Even when i use Turbo1 Google Base module, which by the way i wanted to thank him for sharing it with us.
all i get is like 1500 products out of the 5000

I am not a programmer, i think we lunched our magento site with so many trails and errors.

I would love your opinions and maybe guidelines on how to handle a loaded mageneto store and how to solve this problem because we have like 5000 more products to upload.

Thanks for all the help

Yossi

 
Magento Community Magento Community
Magento Community
Magento Community
 
israelibadamm
Sr. Member
 
Total Posts:  86
Joined:  2007-12-10
 

Ok Guys,

After the upgrade i am having some serious problems. I tried doing the rebuild and i just got an error that i wasn’t able to fix.
It seems like somehow my database is locked or erased, i am not really sure.

All i can see is my database name and number of tables “Bizbooz (227)” but when you click on the database with PHPMyAdmin all i get is there are no tables found in database.

I really need help with this situation, my website is down for already 5 days and like an idiot i don’t have any recent backup

I am attaching two images that i hope will help clear the situation,
The fist is a different magento database i have on the server, and i want to show that this is a focused problem only for bizbooz.com and not to any other sites on my server

The second one shows how i see the database with the problem.

I would like to mention that i got the same problem as a user and as root

Please if anyone even have an idea that might direct me to the right solution let me know.

Image Attachments
boilers.jpgbizbooz.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 3