When testing the comment module, I received the following error message:
user warning: 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 'FROM node WHERE node_comment_statistics.nid = node.nid AND node.nid = 9' at line 1 query: UPDATE node_comment_statistics SET comment_count = 0, last_comment_timestamp = created, last_comment_name = '', last_comment_uid = uid FROM node WHERE node_comment_statistics.nid = node.nid AND node.nid = 9 in /home/scnt/public_html/includes/database.mysql.inc on line 124.
I have access control set to require approval for comments for authenticated users. I have TinyMCE installed and available for use by an autenticated user.
Despite the MySQL error message, I am still able to create the comment and it goes to the approval queue. However, when I select the comment for approval, I get the following error message:
Illegal choice in .
This is the first time I've submitted an issue, so if I've messed it up, or this isn't actually a bug, but my own user error, I apologize.
Roger
Comments
Comment #1
njkt commentedI am also receiving this error but only when trying to delete comments. Hopefulyl some information on this bug (hoping it's not my fault -_-) will be shared and fixed :)
Comment #2
Signe commentedThe issue is that 'FROM' is not valid syntax for an UPDATE query.
UPDATE node_comment_statistics SET comment_count = 0, last_comment_timestamp = created, last_comment_name = '', last_comment_uid = uid FROM node WHERE node_comment_statistics.nid = node.nid AND node.nid = 2
The FROM should be a join, from the look of things.
This works:
UPDATE node_comment_statistics,node SET comment_count = 0, last_comment_timestamp = created, last_comment_name = '', last_comment_uid = uid WHERE node_comment_statistics.nid = node.nid AND node.nid = 2;
Comment #3
killes@www.drop.org commentedfixed in cvs
Comment #4
KSA213755 commentedI'm new at this. Do I just download the comment module from cvs and upload it to my site?
BTW, thanks for fixing it.
Roger
Comment #5
Crell commentedThe beta4 tarball will never change. However, the code will be fixed in whatever the next release is, either beta5 or RC1 (still to be decided). That shouldn't be much longer, I'm guessing.
If you want the fix now!, your best bet is to use a CVS client to download the latest "HEAD" version. I'd recommend just grabbing everything rather than just the one module, since there has been a LOT of bugfixing in the past week or so.
Comment #6
KSA213755 commentedThanks Crell. I'll just wait for the next release as I'm just playing around with 4.7 as I learn how to use Drupal for an upcoming project.
Comment #7
gregglesKSA213755 - changing the title on an issue changes it for the whole issue, not just the comment. It's a different behavior from the forums, so it's hard to get used to.
I changed title back.
The Drupal Handbook page about CVS mentions that you can get a nightly tarball from http://drupal.org/files/projects/drupal-cvs.tar.gz that would get it for you without waiting for a BETA5/RC.
Comment #8
(not verified) commented