Upon enabling the Content Access module and its Content Access Rules Integrations submodule I get the following error. (Note error does not occur when only enabling the Content Access module.)
PHP Fatal error: Cannot redeclare content_access_action_grant_node_permissions() (previously declared in /home1/useraccount/public_html/beta/sites/all/modules/content_access/content_access.rules.inc:92) in /home1/useraccount/public_html/beta/sites/all/modules/content_access/content_access_rules/content_access_rules.rules.inc on line 272
I manually disabled the both Content Access and its submodule and the site's working again. I then re-enabled only the Content Access module as a work-around. Still, the Content Access Rules Integrations submodule is unusable.
Per https://drupal.org/node/72099 two functions with the same name will cause this problem.
content_access.rules.inc has this code:
function content_access_action_grant_node_permissions($node, $settings) {
if (_content_access_rules_check_setting($node)) {
$ca_settings = array();
foreach (_content_access_get_operations() as $op) {
$settings += array($op => array());
$ca_settings[$op] = array_keys(array_flip(content_access_per_node_setting($op, $node)) + array_flip($settings[$op]));
}
content_access_save_per_node_settings($node, $ca_settings);
// A following node_save() updates the grants for us.
return array('node' => $node);
}
}content_access_rules.rules.inc has this code:
function content_access_action_grant_node_permissions($node, $permissions) {
if (!empty($node->nid) && _content_access_rules_check_setting($node)) {
// Transform the value to the content-access format.
$settings = content_access_rules_transform_rules_value($permissions);
$ca_settings = array();
foreach (_content_access_get_operations() as $op => $label) {
// Merge in the array of role-ids for each operation.
$settings += array($op => array());
$ca_settings[$op] = array_keys(array_flip(content_access_per_node_setting($op, $node)) + array_flip($settings[$op]));
}
content_access_save_per_node_settings($node, $ca_settings);
content_access_action_aquire_grants($node);
}
}Is this the problem or am I missing something? (I'm relatively new to php coding.)
Thanks,
JV
Comments
Comment #1
gisleThis issue has not received any updates in the previous 6 years. If you believe it to still be relevant, you are encouraged to reopen the issue and update it.
If you got an email about this Issue status update, it is because you at one time (possibly a very long time ago), subscribed to it. To learn how to unsubscribe yourself, please visit: https://www.drupal.org/project/webmasters/issues/3142987