Closed (fixed)
Project:
modr8
Version:
5.x-2.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2008 at 04:55 UTC
Updated:
16 Apr 2009 at 02:54 UTC
When Modr8 is active, and a non-group member tries to access a group home page, an SQL error is returned. Other than the 10-line error message, it doesn't seem to cause any other problems with OG.
Comments
Comment #1
moshe weitzman commentedIt would be hepful if you post the actual error message as well as any other details about OG and modr8
Comment #2
dleeward commentedHere's the error message:
user warning: Not unique table/alias: 'n' query: SELECT DISTINCT(e.nid) FROM event e INNER JOIN node n ON n.nid = e.nid INNER JOIN node_access na ON na.nid = e.nid LEFT JOIN node n ON e.nid = n.nid INNER JOIN og_ancestry oga ON n.nid = oga.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'nodeaccess_rid') OR (na.gid = 0 AND na.realm = 'nodeaccess_uid') OR (na.gid = 0 AND na.realm = 'nodeaccess_author') OR (na.gid = 1 AND na.realm = 'node_privacy_byrole_role') OR (na.gid = 0 AND na.realm = 'node_privacy_byrole_user') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ((n.moderate != 1)) AND (oga.group_nid = 54) AND ( e.event_start >= 1224678617 ) ORDER BY e.event_start in /home/xxxx/public_html/includes/database.mysql.inc on line 172.
The OG project page is at http://drupal.org/project/og
Comment #3
moshe weitzman commentedThe node table is joined twice there ... You are running with nodeprivacybyrole and nodeaccess module? and og which is pretty much an unteneable situation. I suggest picking on node access module, or becoming an expert in the node access system. at minimum remove everything but og and modr8 and see if the error goes away.
Comment #4
dleeward commentedI was running both Nodeaccess 5.x-1.x-dev and Node Privacy By Role 5.x-1.0. I've turned off Nodeaccess but now I'm getting the following message:
user warning: Not unique table/alias: 'n' query: SELECT DISTINCT(e.nid) FROM event e INNER JOIN node n ON n.nid = e.nid INNER JOIN node_access na ON na.nid = e.nid LEFT JOIN node n ON e.nid = n.nid INNER JOIN og_ancestry oga ON n.nid = oga.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'node_privacy_byrole_role') OR (na.gid = 0 AND na.realm = 'node_privacy_byrole_user') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ((n.moderate != 1)) AND (oga.group_nid = 39) AND ( e.event_start >= 1224681774 ) ORDER BY e.event_start in /home/xxxx/public_html/includes/database.mysql.inc on line 172.
which is different than the earlier message.
Do I need to make an adjustment to the tables or run the update script?
Do you have any recommendations between those two modules as well and Content Access, TAC or Simple Access? I'm looking to do the following things:
1. allow anonymous users access to content only if it is tagged "Public".
2. allow an editor to manage and moderate only certain node types.
Thanks for your help.
Comment #5
dleeward commentedI also turned off Node Privacy By Role and now get this error message:
user warning: Not unique table/alias: 'n' query: SELECT DISTINCT(e.nid) FROM event e INNER JOIN node n ON n.nid = e.nid INNER JOIN node_access na ON na.nid = e.nid LEFT JOIN node n ON e.nid = n.nid INNER JOIN og_ancestry oga ON n.nid = oga.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ((n.moderate != 1)) AND (oga.group_nid = 39) AND ( e.event_start >= 1224682640 ) ORDER BY e.event_start in /home/xxxx/public_html/includes/database.mysql.inc on line 172.
Forgot to tell you, in all cases, an Anonymous user can still see the content after the error message.
Comment #6
dleeward commentedI've now determined that permissions are being honored, but this error message (or a similar one) still appears when a group home page is viewed by users that are not members of a group. Both Node Access and Node Privacy by Role are turned off.
Is there anything that can be done?
Comment #7
dleeward commentedWhat additional information is required?
Comment #8
pwolanin commentedThe problem seems likely to stem from the event module since there are 2 joins against
node nComment #9
dleeward commentedThe problem was with the OG event (or maybe with OG Calendar, don't remember now).