I get this error when I enable the module
user 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 ') AND n.status = 1 ORDER BY sticky DESC, created DESC LIMIT 10'
query: SELECT DISTINCT(n.nid), n.title, n.body FROM term_node t INNER JOIN node n ON t.nid = n.nid WHERE t.tid IN () AND n.status = 1 ORDER BY sticky DESC, created DESC LIMIT 10 in /customers/masys.se/masys.se/httpd.www/includes/database.mysql.inc on line 66.
Anders E
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | taxonomy_block.patch | 951 bytes | donalm |
Comments
Comment #1
donalm commentedAfter enabling taxonomy_block I had the following error for users other than Admin.
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT DISTINCT(n.nid), n.title, r.body, sticky, created FROM term_node t INNER JOIN node_access na ON na.nid = n.nid INNER JOIN node n ON t.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'term_access'))) AND t.tid IN (6,7,4) AND n.status = 1 ORDER BY sticky DESC, created DESC LIMIT 12 in /Library/WebServer/share/drupal48/includes/database.mysqli.inc on line 125.
This reminded me of: http://drupal.org/node/46864.
The query seems to be written in such a way that db_rewrite_sql breaks it. The following revised query works for me:
I've attached a patch for current CVS of taxonomy_block.module. I'm new to Drupal, so I may well have done something brain-dead. I'd appreciate review from someone who knows the platform.
Comment #2
silurius commentedJust bumping because I seem to have stumbled across this one too.
Comment #3
drewish commentedcould you roll a patch with the differences?
Comment #4
drupalnesia commentedUpgrade to 6.x version. Thanks.