forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: AndromAK on January 31, 2006, 12:25:46 am

Title: critical error on posting a comment
Post by: AndromAK on January 31, 2006, 12:25:46 am
When I post a comment, there is a critical error and the following message:

Il y eu une erreur lors de l'exécution de la requête.
(There was an error during the query execution)

------------

I deleted all  comments as an admin, and i could test and post a new comment without error, but the second time i post one, there is the same message... (and I noticed that the first comment wasn't shown in the caption of the image)

------------

here is the debug log...

Quote
While executing query "INSERT INTO gallery_comments (pid, msg_author, msg_body, msg_date, author_md5_id, author_id, msg_raw_ip, msg_hdr_ip) VALUES ('92', 'test', 'test', NOW(), 'aec310c6278d4d1471e5c5879f12c228', '0', '86.201.165.219', '86.201.165.219')" on 0

mySQL error: Duplicate entry '0' for key 1

Thank you very much for your help...
Title: Re: critical error on posting a comment
Post by: Nibbler on January 31, 2006, 12:26:48 am
Look at the gallery_comments table using phpmyadmin and verify that the msg_id field is set as auto_increment.
Title: Re: critical error on posting a comment
Post by: AndromAK on January 31, 2006, 12:38:27 am
Thank you very much for your VERY quick answer

and you were right!!  :D
msg_id field wasn't set to auto_increment

There isn't any problem anymore, and comments can be added.

I wonder how this value was changed...  ???  perhaps I did something wrong when I imported the tables...

Thank you very much, again!
Title: Re: critical error on posting a comment
Post by: Nibbler on January 31, 2006, 12:41:13 am
You might like to check other fields that are supposed to be auto_increment and make sure they are. Check the schema.sql in the sql directory.