Modr8 conflicts with Organic Groups (OG)

dleeward - October 22, 2008 - 04:55
Project:modr8
Version:5.x-2.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

moshe weitzman - October 22, 2008 - 12:41

It would be hepful if you post the actual error message as well as any other details about OG and modr8

#2

dleeward - October 22, 2008 - 14:32

Here'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

#3

moshe weitzman - October 22, 2008 - 14:36
Status:active» postponed (maintainer needs more info)

The 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.

#4

dleeward - October 22, 2008 - 15:31

I 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.

#5

dleeward - October 22, 2008 - 15:40

I 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.

#6

dleeward - November 5, 2008 - 22:59

I'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?

#7

dleeward - December 14, 2008 - 02:28

What additional information is required?

#8

pwolanin - January 3, 2009 - 00:17

The problem seems likely to stem from the event module since there are 2 joins against node n

#9

dleeward - April 16, 2009 - 02:54
Status:postponed (maintainer needs more info)» closed

The problem was with the OG event (or maybe with OG Calendar, don't remember now).

 
 

Drupal is a registered trademark of Dries Buytaert.