It looks to me that og_access may breake the taxonomy_term view: if I try to access the view as anonymous I wont see any nodes and I get the following exception in the log:

SELECT DISTINCT node.nid AS nid, node.sticky AS node_sticky, node.created AS node_created FROM handball_node node WHERE (node.status <> 0 OR (node.uid = 0 AND 0 <> 0) OR 0 = 1) AND (node.type in ('story')) AND (node.vid IN ( SELECT tn.vid FROM handball_term_node tn INNER JOIN handball_node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( tn.tid = 108 )) )ORDER BY node_sticky DESC, node_created DESC LIMIT 0, 10

Please note I am using a vanilla taxonomy_term view including a restriction on node type.

This wont happen as logged-in user. Furthermore, if I clean up the node_access table (as it would look like if og_access was disabled) everything works fine.

Is this now a wrong views implementation that is not able to handle node_access table entries correctly, or is this a og_access related problem? Can anybody help me?

Comments

crac’s picture

Sorry, I realized I posted only parts of the exception output:

Unknown column 'node.nid' in 'on clause' query: SELECT DISTINCT node.nid AS nid, node.sticky AS node_sticky, node.created AS node_created FROM handball_node node WHERE (node.status <> 0 OR (node.uid = 0 AND 0 <> 0) OR 0 = 1) AND (node.vid IN ( SELECT tn.vid FROM handball_term_node tn INNER JOIN handball_node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( tn.tid = 2 )) )ORDER BY node_sticky DESC, node_created DESC LIMIT 0, 10 in /home/httpd/vhosts/svlaegern.ch/httpdocs/sites/all/modules/views/includes/view.inc in Zeile 771.

crac’s picture

Status: Active » Closed (fixed)

I found a patch of node.module which solved the problem: http://drupal.org/node/681760

Strange that nobody else encountered this problem before.