critical error on posting a comment critical error on posting a comment
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

critical error on posting a comment

Started by AndromAK, January 31, 2006, 12:25:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AndromAK

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...

QuoteWhile 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...

Nibbler

Look at the gallery_comments table using phpmyadmin and verify that the msg_id field is set as auto_increment.

AndromAK

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!

Nibbler

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.