Hello.
I have some problems with enabling access control, as it interferes with my Acidfree photo album module.
After enabling access control i recieve the following sql error when trying to view my albums.
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 'DISTINCT(node.nid) AS node_nid FROM node node LEFT JOIN term_no query: SELECT DISTINCT(node.nid), node.sticky AS node_sticky, DISTINCT(node.nid) AS node_nid FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid AND term_data.vid IN ('198') LEFT JOIN term_node term_node2 ON node.nid = term_node2.nid WHERE (term_node.tid IS NOT NULL) AND (term_data.tid IS NOT NULL) AND (node.status = '1') AND (term_node2.tid = '532') GROUP BY node.nid ORDER BY node_sticky DESC, node_nid DESC LIMIT 0, 15 in /home/www/janosch.dk/fda/includes/database.mysql.inc on line 172.
It starts to appear right after i click the "enbale access control" button. Now i have tried to disable access control again, but the error keeps showing up. I tried to reset permissions under Content settings, but that didn't help either.
I am not any good at php, but it seems like acidfree comes with this error when the command node_access_rebuild(); is run. When i try to look further into it i get nowhere, so i hope some of you guys can help?
Also how i can get it to work without starting from scratch ;)
Thank you
Rasmus
Comments
Comment #1
scor commentedI have the same problem, and I use og and its access control. But as opposed to janosch, when I desactivate the og access control, I don't have the sql error anymore and the albums are displayed properly.
Comment #2
scor commentedI just updated my og module to the 5.x-2.2 version, and it seems to be working fine. try that, and if it still doesn't work, try to select image and album in the "Omitted content types" box of the og Node authoring form section.
Comment #3
moshe weitzman commentedi have no idea if those two DISTINCT() clauses are the fault of Views or core or acidfree but they are not fault of og. please move t other project and reopen. sorry.
Comment #4
scor commentedJanosch, did you check if you have a record for nid=0 in the node_access table ?