Hi,
I installed Forum access, and I see no errors when I am logged as Admin. However, when I log out, I get this SQL error:
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 'AS r ON n.nid=r.nid INNER JOIN term_node AS t ON n.nid = t.nid INN' at line 33 query: SELECT n.title AS topictitle, r.title AS replytitle, r.time timestamp, r.type AS replytype, n.type AS topictype, n.nid AS topicid, t.tid, r.cid AS cid, r.uid, u.name FROM node AS n INNER JOIN ( (SELECT title, created AS time, nid, uid, type, 'cid' AS cid FROM node ) UNION (SELECT subject, timestamp, nid, uid, 'comment', cid FROM comments 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') OR (na.gid = 1 AND na.realm = 'forum_access'))) AND ( comments.status = 0 ) ORDER BY time DESC ) AS r ON n.nid=r.nid INNER JOIN term_node AS t ON n.nid = t.nid INNER JOIN users AS u ON r.uid = u.uid 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') OR (na.gid = 1 AND na.realm = 'forum_access'))) AND ( n.status = 1 ) GROUP BY tid; in /home/site/public_html/includes/database.mysql.inc on line 172.
Any ideas how to fix it?
Comments
Comment #1
salvisI cannot find the query that you're showing. Search all of your modules for a string such as
r.title AS replytitleorsubject, timestamp, nid, uid, 'comment', cid— then you have your likely culprit.There's an opening parenthesis too many, but this is not FA specific — it'll probably happen with any node access control module.
Comment #2
salvisPlease reopen if you have more information.