Fatal error
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '##.field_data_group_audience' doesn't exist: SELECT og.etid as nid FROM {field_data_group_audience} a INNER JOIN {node} n ON a.entity_id = n.nid INNER JOIN {og} og on a.group_audience_gid = og.gid WHERE n.nid = :nid AND n.type NOT IN (:types_0); Array ( [:nid] => ## [:types_0] => ) in subdomain_mode_group->get_content_subdomain() (line 40 of /***************/modules/subdomain/includes/subdomain_mode_group.inc).
og table & field_data_group_audience table doesn't exist http://drupal.org/node/1456356#comment-5653016
fixed by modifying code in below function
function get_content_subdomain($nid) {
static $subdomains;
if (!isset($subdomains[$nid])) {
/* $sid = db_query("
SELECT og.etid as nid
FROM {field_data_group_audience} a
INNER JOIN {node} n ON a.entity_id = n.nid
INNER JOIN {og} og on a.group_audience_gid = og.gid
WHERE n.nid = :nid AND n.type NOT IN (:types)",
array(':nid' => $nid, ':types' => _subdomain_filtered_content_types()))
->fetchField(); */
$sid = db_query("SELECT gid from og_membership where field_name = 'og_group_ref' AND etid = :nid LIMIT 1",
array(':nid' => $nid))->fetchField();
$subdomains[$nid] = subdomain_get_subdomain($sid);
}
return $subdomains[$nid];
}
Comments
Comment #1
adammaloneFix works for me - patchfile attached.
Going to bump to critical as this causes sitewide errors when group setting is on and admin/content unavailable.
Comment #2
adammaloneComment #4
honza pobořil commentedI made some changes and commited it. Could you check dev version, please? If it is ok, mark this issue as fixed.
Comment #5
honza pobořil commentedComment #6
honza pobořil commentedComment #7
honza pobořil commented