Database error when a comment is posted.
-
I get the following errors when someone posts a comment:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE comment_ID = 36’ at line 1]
UPDATE wp_comments SET comment_reply_ID= WHERE comment_ID = 36;
Warning: Cannot modify header information – headers already sent by (output started at /nfsn/content/philatelictidbits/htdocs/wp-includes/wp-db.php:98) in /nfsn/content/philatelictidbits/htdocs/wp-comments-post.php on line 44
[Repeat errors]
Any idea on how to fix this?
-
Sounds like you have some sort of threaded comments plugin enabled but without the appropriate change to the tables.
Well, I do have a threaded comments plugin enabled, but I don’t recall there being any need for a change to the tables. I will check on that.
Okay, it is definitely connected with the threaded comments plugin, as the problem disappears when I disable it. I am using Brian’s threaded comments. How do I get it to work again? It used to work before I switched to the Equix theme.
But, I get this problem even without this threaded plugins.
Is it because of Spam Karma?
I have never seen this error with SK/SK2.
Have you altered any core files ?
Tried running upgrade.php ?No i haven’t editted any core files.
Should I run upgrade.php again? I am using 1.5.1
I ran upgrade.php again.
Can you post a comment on my blog and see what you get?
Posted, no error π
Checked….. hopefully it doesn’t return……
Scratches head.
Thanks for testing π
Damn it returned when I posted.
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘t return.’ LIMIT 1′ at line 1]
SELECT comment_ID FROM wp_comments WHERE comment_post_ID = ‘298’ AND ( comment_author = ‘Ajay’ OR comment_author_email = ‘me@ajaydsouza.com’ ) AND comment_content = ‘So far so good. Hopefully, it doesn’t return.’ LIMIT 1Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 51
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 52
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 53
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 55
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 56
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 57
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 58
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-includes/pluggable-functions.php on line 129
Already tried that moshu several times.
The files don’t have any spacesNow it doesn’t seem to be coming.
Is this some random occurence?If you have a spam blacklist, check it for spaces / wierd characters.
Does your email address have any wierd characters ?
Does this happen if you post with one address and not another ?
Are you running the latest version of SK for your install ?WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s fixed now hopefully. Thanks for the ErrorDocument SELECT comment_ID FROM wp_comments WHERE comment_post_ID = ‘302’ AND ( comment_author = ‘Ajay’ OR comment_author_email = ‘me@ajaydsouza.com’ ) AND comment_content = ‘I have gotten the site working again. For some reason the .htaccess file disappeared. It’s fixed now hopefully. Thanks for the ErrorDocument code. I have added that to the .htaccess Now I guess you can link to the plugin. I have also released the plugin via WP-Plugin manager. Lastly, who did you find the id of my post?’ LIMIT 1
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 51
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 52
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 53
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 55
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 56
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 57
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 58
Warning: Cannot modify header information – headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-includes/pluggable-functions.php on line 129
Running the latest version of SK2 and wP.
The topic ‘Database error when a comment is posted.’ is closed to new replies.