0

I'm building my first Drupal Organic Groups site, and running into problems.

Problem:

My goal is to have top-level Groups that are visible to the public, but only members can participate in them. There will be public subgroups too. Additionally, there must be invisible private groups that only members can see. All non-members, even logged-in site users, should not even see the group exists.

Since OG doesn't support sub-groups in the core and the OG subgroups module is an alpha release, I tried making my own sub-group solution. (see description below)

A browser session not logged into the site does not show the private subgroup, as needed. However, a logged in user who is not a member of the group can see, not only the group name, but the member list and description (body field). The content is successfully hidden, stating "There is no content in this group."

Does OG support what I am trying to accomplish?

I have read these and other pages:

My configuration matches what is shown on those two references. (See screen captures below)

System and method description:

Fresh install of Drupal 7.26 and OG 7.x-2.5.

I created a new content type called "Subgroup" and assigned it all the OG fields (group_access, og_roles_permissions, group_register, group_content_access, group_theme), and marked both "Group" and "Group Content" in the Organic Groups tab in the Content Type creation form. The Subgroup content type also has an Entity Reference field type named "Parent Group." That is set to Target type "node"; Entity Selection -> Mode = Organic Groups; Target Bundles = Group; no sorting; OG membership type = default. "OG behavior" is checked under "Additional Behaviors.

To test, I created a Subgroup node titled "Drupal theming (PRIVATE)", with both Group Visibility and Group Content Visibility set to "Private - accessible only to group members". Other OG settings were: "Override default roles and permissions" (since my site OG default is to be public) and "Do not show on registration page." The site is using the default OG Node template panel for Groups.

I verified that the "non-member" role of the private subgroup has no permissions boxes checked in Subgroup > Group tab > Permissions panel.

In case it may be a clue, whenever I try to save an update to a Subgroup content type node, the system displays this error:

Notice: Undefined index: field_mode in OgBehaviorHandler->validate() (line 254 of /my/domain/path/sites/all/modules/og/plugins/entityreference/behavior/OgBehaviorHandler.class.php).

private subgroup problem

Subgroup params

Content type OG settings

0

I recently experienced this same "Undefined index: field_mode in OgBehaviorHandler..." error when trying to set the og_group_ref field widget to select list. It appears that it doesn't work if it's not set to "OG Reference". In the "Additional behaviors" field, you can set it to select there, but the widget needs to be left as the default value. Try that and see if it's of any help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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