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.

og-access-rebuild-exception-group-type.patch1.1 KBezra-g
PASSED: [[SimpleTest]]: [MySQL] 894 pass(es). View


ezra-g’s picture

Issue tags: +commonslove

Adding the 'commonslove' tag.

amitaibu’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

joachim’s picture

Priority: Normal » Critical

Could we get a new release? This really was a critical -- if you have private non-node groups, then everything is broken.

idcm’s picture

I 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:

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/
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/

The group content visibility field stays set to "use group defaults"

Help pls!!

idcm’s picture

update 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

clemens.tolboom’s picture