2

Drupal Commons 7.x-3.2
Organic Groups 7.x-2.1

Content type: Mygroup
Field: Group visibility - value: Public

Content type: Mypost
Field: Group - default value: Mygroup
Field: Group content visibility - default value: Use group defaults

Now when I create a group and a post based off on these content types everything is fine. As in everything is visible for all users.

Now when I change the Group visibility to Private I would except the post to not be visible anymore (because of the Use group defaults setting.

Unfortuanetely that's not working until I resave the post content. Then it will respect it's parent's settings.

This bug is mentioned in this video (around 6 min)

Does anyone know how to solve this problem?

1

1 Answer 1

0

Reason. I assume you see this behavior because all the node permissions are cached in Drupal, and only updated when (re-)saving a node or rebuilding the permissions.

Workaround. So instead of re-saving all nodes of your group individually, a faster workaround would be to go to admin/reports/status/rebuild and rebuild all permissions at once. This would probably also be the place to hook into for a real bugfix: rebuilding of the group nodes permissions, triggered when saving the group node with a different value in the "Group visibility" field.

(This answer is an educated guess, I didn't test myself so far.)

Redesign discussion. A still better solution would however be a larger rework of the OG permissions system, as discussed in Drupal issue #1122388. See esp. comment #10 there, discussing that the "Group content visibility: use group defaults" value is not that meaningful as it prohibits a use case where one wants the group itself publicly visible, but have its content default to private, and setting that via a fallback to the group setting so that later changes are simple. This scenario (publicly visible group node with private group content nodes) is supported by newer versions of Drupal Commons 7.x-3.x (using OG 7.x-2.7 here), but changing the setting only affects group content nodes added afterwards. So it's not the "fallback to group provided default" we want here, even though the "Group content visibility" field has "use group defaults" as its default value (which is not used though). That could be reported as a bug / improvement request to Drupal Commons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.