Commit b32258ab authored by ezra-g's avatar ezra-g Committed by amitaibu

Issue #2063385 by ezra-g: _og_access_verify_access_field_existence() assumes...

Issue #2063385 by ezra-g: _og_access_verify_access_field_existence() assumes node group type, throws an exception rebuilding node access
parent 3716e5e6
......@@ -240,14 +240,14 @@ function _og_access_verify_access_field_existence($node) {
$target_type = $field_info['settings']['target_type'];
foreach (array_keys($groups_bundles[$target_type]) as $bundle) {
$instances = field_info_instances('node', $bundle);
$instances = field_info_instances($target_type, $bundle);
// Verify that the OG access field is attached to the group bundles.
if (empty($instances[OG_ACCESS_FIELD])) {
$params = array(
'@nid' => $node->nid,
'@bundle' => $bundle,
);
throw new OgException(format_string('Cannot set visibility of node ID @nid as the group node of type "@bundle" does not have the "Group visibility" field attached to it.', $params));
throw new OgException(format_string('Cannot set visibility of node ID @nid as the group of type "@bundle" does not have the "Group visibility" field attached to it.', $params));
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment