See comment #8 where the steps are described and comment #11 that confirms the change!
-------------
I'm using drupal 7.23.Recently updated og to latest recommended version.After that i Rebuild the content access permissions got this error
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /pinaque/batch?render=overlay&id=145&op=do StatusText: Service unavailable (with message) ResponseText: OgException: Cannot set visibility of node ID 12 as the group of type "open_group" does not have the "Group visibility" field attached to it. in _og_access_verify_access_field_existence() (line 250 of D:\xampp\htdocs\p\sites\all\modules\og\og_access\og_access.module).
After that I tried to create the article (having the group audience field) but it gives the same error
OgException: Cannot set visibility of node ID 54 as the group of type "open_group" does not have the "Group visibility" field attached to it. in _og_access_verify_access_field_existence() (line 250 of D:\xampp\htdocs\p\sites\all\modules\og\og_access\og_access.module).
Every content which has the group audience field gives the same error.
I have two group types One is Open group & another is Close group.Since i don't want that open group have the group visibility option so I didn't add group visibility field in it.
Comment | File | Size | Author |
---|---|---|---|
#14 | 2063479-error-on-rebuilding-permissions-14.patch | 1.62 KB | Dimitrius |
Comments
Comment #1
cord1 CreditAttribution: cord1 commentedBelow problem solved in commons 7.x-3.3-rc4
******************************************
trying to add a post to the group I get following excetpion:
OgException: Cannot set visibility of node ID 13 as the group node of type "user" does not have the "Group visibility" field attached to it. in _og_access_verify_access_field_existence() (line 250 of /srv/www/htdocs/commons7x33rc2/profiles/commons/modules/contrib/og/og_access/og_access.module).
The same happens with a Public group with "Any site member can contribute"
Comment #2
saurabh tiwari CreditAttribution: saurabh tiwari commentedI'm not using drupal commons.
AT last i have to add the group visibility field to open group to solve the problem.Set it to default & hide the field.
Comment #3
Sigvard CreditAttribution: Sigvard commentedI have exactly the same problem.
How did you solve it?
I triggers when rebuilding permissions and when I try to create a node with "use group defaults" as visibility.
Comment #4
saurabh tiwari CreditAttribution: saurabh tiwari commentedI think you need to add the "Group visibility field" to your groups.
Comment #5
Sigvard CreditAttribution: Sigvard commentedNow I've solved my problem. Apparently I had accidently selected "Posts" to be groups and group content despite being supposed to only be content posted to a group.
The error message I got was:
OgException: Cannot set visibility of node ID 326 as the group node of type "post" does not have the "Group visibility" field attached to it. in _og_access_verify_access_field_existence() (line 250 of /var/www/***/sites/all/modules/og/og_access/og_access.module).
Apparently this became an issue because the
_og_access_verify_access_field_existence($node) {
Didn't exist in older versions of OG Access and now it seem to test all content types each time you post any node.
I am not sure on if this is intended but that is how it works.
Comment #6
joachim CreditAttribution: joachim commentedFor this error:
OgException: Cannot set visibility of node ID 54 as the group of type "open_group" does not have the "Group visibility" field attached to it. in _og_access_verify_access_field_existence() (line 250 of D:\xampp\htdocs\p\sites\all\modules\og\og_access\og_access.module).
See #2063385: _og_access_verify_access_field_existence() assumes node group type, throws an exception rebuilding node access.
Comment #7
royerd CreditAttribution: royerd commentedCan you explain how to add group visibility field to the group? My group members have lost their ability to see each others' user profiles or any access to their fellow group members.
Comment #8
RogerBTry this.
That fixed it for me.
Comment #9
royerd CreditAttribution: royerd commentedThank you.
Comment #10
sassafrass CreditAttribution: sassafrass commentedI encountered the same error after upgrading and trying to rebuild permissions. The og-access, field visibility issue created access problems in the first place which is why I tried to rebuild them.
I tried to add the visibility field to my groups via #8; however, I got an error saying that the visibility field could only by added to Node Entities, which my group is. It is noteworthy to add that I updated the OG module and the Entity module at the same time, because they both had security updates.
My final solution was to revert back to the previous version of OG and rebuild the permissions. Things are now working as expected, but it doesn't fix/explain the issue in the upgrade other than that the problem lies with the visibility field in the og access module.
Comment #11
amitaibu#8seems to be the right answer - OG now forces you to have a visibility field on the group itself (i.e. not only on the group-content).
Comment #13
Dimitrius CreditAttribution: Dimitrius commentedAfter updating to og 7.x-2.3 I have the same error when trying to rebuild permissions or update group content which have a relation with different group types - node and user groups for my case:
"OgException: Cannot set visibility of node ID 812 as the group node of type "user" does not have the "Group visibility" field attached to it. in _og_access_verify_access_field_existence() (line 250 of sites/all/modules/og/og_access/og_access.module)."
So as an OG field access ('Group visibility') can be added only to the node group then I guess need to verify in the _og_access_verify_access_field_existence() function only the node groups
Comment #14
Dimitrius CreditAttribution: Dimitrius commentedRe-roll for 7.x-2.4
Comment #16
Dimitrius CreditAttribution: Dimitrius commentedChange the version
Comment #17
Dimitrius CreditAttribution: Dimitrius commented14: 2063479-error-on-rebuilding-permissions-14.patch queued for re-testing.
Comment #19
rbrownell#8 Also worked for me... Years later.
Comment #20
izmeez CreditAttribution: izmeez commented