Logged in as a normal user i got an SQL error as follows:
user warning: Unknown column 'domain' in 'where clause' query: SELECT COUNT(*) FROM (SELECT node.nid AS nid FROM node node INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.realm = 'all' AND na.gid = 0) OR (na.realm = 'workflow_access' AND na.gid = 2) OR (na.realm = 'workflow_access' AND na.gid = 3) OR (na.realm = 'workflow_access_owner' AND na.gid = 4)) AND na.nid IN (SELECT na.nid FROM node_access na WHERE ((na.realm = 'domain_site' AND na.gid = 0) OR (na.realm = 'domain_id' AND na.gid = 0))) ) AND (((SELECT COUNT(1) FROM node_access nasq WHERE na.nid=nasq.nid AND realm IN ('domain_site','domain_id')) = 0 OR (SELECT COUNT(1) FROM node_access nasq WHERE na.nid=nasq.nid AND ((gid=0 AND realm='domain_site') OR (gid=domain AND realm='domain_site') OR (gid=0 AND realm='domain_id') OR (gid=domain AND realm='domain_id'))) > 0) AND ((SELECT COUNT(1) FROM node_access nasq WHERE na.nid=nasq.nid AND realm IN ('workflow_access','workflow_access_owner')) = 0 OR (SELECT COUNT(1) FROM node_access nasq WHERE na.nid=nasq.nid AND ((gid=2 AND realm='workflow_access') OR (gid=3 AND realm='workflow_access') OR (gid=4 AND realm='workflow_access_owner'))) > 0)) AND ( node.status <> 0 )) count_alias in /home/johnny/workspace/smuldersgroup.com/modules/drupal.org/views/includes/view.inc on line 739.

I traced this back to the module grants module in the _grants_by_module function in the module.grants.module file on line 679.

in my domain module i've enabled the multi node access module patch so perhaps this has caused this? but what happens is that the $module_grants array contains this:
Array ( [domain_site] => Array ( [0] => 0 [group] => domain ) [domain_id] => Array ( [0] => 0 [group] => domain ) )

so it contains a [group] => domain which causes the problem

as a simple fix i've altered line 678/679/680:
foreach ($gids as $gid) {
$module_gids[] = "(gid=$gid AND realm='$realm')";
}

into:
foreach ($gids as $label => $gid) {
if(is_numeric($label)) $module_gids[] = "(gid=$gid AND realm='$realm')";
}

this removes the problem for me

Comments

rdeboer’s picture

Thanks Johnny for reporting both the problem and a solution!
Just wanted to acknowledge it now and investigate the ins and outs soon.
Rik

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Active » Fixed

Added check for numeric $gid and comitted to repository, so is available when you check out CVS HEAD. Will be available in next official release.

rdeboer’s picture

Status: Fixed » Closed (fixed)

Fixed in 6.x-3.4 and later.