At first time i found this error, i think it's caused by autoinstall webhost that give less featur.

But Now.. I think its really great bug. I Tried install again my web manually and i still get this error.
And after i tried to surf at drupal.org forum about this error, i got much similliar problem.

This error at front page:
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 ') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC LIMIT 5' at line 1 query: SELECT DISTINCT(n.nid), n.title, r.body, n.sticky, n.created FROM term_node t INNER JOIN node n ON t.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid WHERE t.tid IN () AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC LIMIT 5 in /mounted-storage/home71c/sub004/sc41371-VJKA/esoft.web.id/includes/database.mysql.inc on line 172.

And this is error at admin page:
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 ') AND n.status = 1 ) ORDER BY n.sticky DESC, n.created DESC LIMIT 5' at line 1 query: SELECT DISTINCT(n.nid), n.title, r.body, n.sticky, n.created FROM term_node t INNER JOIN node n ON t.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'content_access_rid'))) AND ( t.tid IN () AND n.status = 1 ) ORDER BY n.sticky DESC, n.created DESC LIMIT 5 in /mounted-storage/home71c/sub004/sc41371-VJKA/esoft.web.id/includes/database.mysql.inc on line 172.

Please anyone can help me...

Comments

drumm’s picture

Project: Drupal core » Content Access
Version: 5.2 » 5.x-1.2
Component: database system » Code

na.realm = 'content_access_rid'

I think this is caused by the Content Access module. A contributed module is trying to work with taxonomy terms, but not dealing well with not having any.

fago’s picture

Project: Content Access » Drupal core
Version: 5.x-1.2 » 5.2
Component: Code » database system
Priority: Critical » Normal

content access does nothing more than inserting node access grants. It doesn't do anything related with taxonomy and it doesn't generate the part "t.tid IN ()" of the query.

I don't know which module might cause that, so I set it back to drupal.

Do you have any taxonomy related modules installed?

stevenpatz’s picture

Status: Active » Fixed

re-open if still an issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.