Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the Commons Trusted Contacts module, every user is a publicly visible group that can contain nodes visible only to members of the group (a user's trusted contacts).
However, we get an exception when rebuilding node access permissions because OG_Access assumes that the group entity type is 'node.' #2019057: Enabling og_access causes an exception when rebuilding node access permissions.
The patch resolves the issue for me.
Comment | File | Size | Author |
---|---|---|---|
og-access-rebuild-exception-group-type.patch | 1.1 KB | ezra-g | |
Comments
Comment #1
ezra-g CreditAttribution: ezra-g commentedAdding the 'commonslove' tag.
Comment #2
amitaibuCommitted, thanks.
Comment #4
joachim CreditAttribution: joachim commentedCould we get a new release? This really was a critical -- if you have private non-node groups, then everything is broken.
Comment #5
idcm CreditAttribution: idcm commentedI am using version 2.4 and am still having this issue. When I went to save a content node in a private group, I got this error and the save wouldn't execute:
OgException: Cannot set visibility of node ID 43 as the <em class="placeholder">node</em> group of type <em class="placeholder">group</em> does not have the "Group visibility" field attached to it. in _og_access_verify_access_field_existence() (line 254 of /home/.../html/sites/all/modules/og/og_access/og_access.module)
I looked at line 254 and see this:
throw new OgException(format_string('Cannot set visibility of node ID !nid as the %entity_type group of type %bundle does not have the "Group visibility" field attached to it.', $params));
It does not match the patch on this post. So ... I tried the line from the patch and was able to save the node.
Unfortunately, now I have other issues:
First:
Warning: include_once(/home/.../html/sites/all/modules/og/og_access/og_access.module) [function.include-once]: failed to open stream: Permission denied in drupal_load() (line 1105 of /home/.../html/includes/bootstrap.inc).
Warning: include_once() [function.include]: Failed opening '/home/.../html/sites/all/modules/og/og_access/og_access.module' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in drupal_load() (line 1105 of /home/.../html/includes/bootstrap.inc).
Second:
The group content visibility field stays set to "use group defaults"
Help pls!!
Comment #6
idcm CreditAttribution: idcm commentedupdate on comment #5
I started over with fresh og code. no errors but no private access either. I created a private group but all users can see it. I tried to create a private node, but all can see it.
I don't know what I'm doing wrong. grrrr
Comment #7
clemens.tolboom@idcm see #2063479-8: OG requires a visibility field on the group itself (i.e. not only on the group-content). which worked for me.