Hello,

I recently updated my Drupal to 7.52 an now i get the following error if i visit my website (only for anonymous users) :

PDOException : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (c.status = '1') AND (n.status = '1') ORDER BY c.created DESC, c.cid DES' at line 2: SELECT c.* FROM {comment} c INNER JOIN {node} n ON WHERE (c.status = :db_condition_placeholder_0) AND (n.status = :db_condition_placeholder_1) ORDER BY c.created DESC, c.cid DESC LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 1 ) dans comment_get_recent() (line 519 in /var/www/mon-site/site/modules/comment/comment.module).

When i disable Comment module, everything is ok... But i no longer have Comment's functionality on my website.

Somebody have any solution ?

Thank you,

Gatien

Comments

sprite’s picture

Did you run update.php after setting up the new code base?

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

gatiensancho’s picture

Hi, thanks to you
Yes, i did it, but i didn't settings the maintenance mode on. I know it was a bad idea, but the customer wasn't put off the service.

mmjvb’s picture

Does it read like $query->innerJoin('node', 'n', 'n.nid = c.nid');

The INNER JOIN is missing the part of ON n.nid = c.nid, making it invalid and not expecting the WHERE ...