Hi,

I have two group node types: type1 and type2, where type1 allows subgroups and type2 doesn't (from the subgroups configuration page).

I have created groups of both types:
groupA of type type1 (so groupA can have subgroups)
groupB of type type2 (so groupB cannot have subgroups).

When I want to post new content to groupB (which doesn't allow subgroups), the audience list only shows the groups of type type1, i.e. the audience list contains groupA but not groupB. So I cannot post my content into a group of type2 that doesn't allow subgroups.

I think it is a bug, but if there is a configuration option that I missed, I would appreciate if someone could let me know.

Thanks

Comments

wickedwookie’s picture

Priority: Normal » Major

I experience the same behavior, which I experienced as quite annoying. Why can't I have groups of one type with subtypes but also other, generic groups from a different type? og_subgroups breaks content posting for these, other groups.

The search begins in line 73 in og_subgroups.module:

// Replace the groups with our list
$form['og_nodeapi']['visible']['og_groups']['#options'] = $groups;

Actually, groups is set by og_subgroups_group_select_options in form.inc, which in turn calls _og_subgroups_group_select_options_without_family which is supposed to " // Add the groups that don't have children", but only adds subgroups enabled groups:
tree.inc, line 422

    // Make sure this type is enabled
    if (og_subgroups_is_subgroup_type($group->type)) {
      $groups[$group->nid] = $group;
    }

I am unsure if just removing the if-statement is the way to go here for everyone. It is in my case, though.

Like I said before, this breaks group content posting for all other group types, which is why I switch the priority to major.