When I create a new group (type club) I am unable to set the parent of the group.

I have the follow node types defined as groups.

Region
-- Club

In OG Subgroup config I have 'Provide a 'set parents' form element' set to TRUE on the Club.

On the node create form I do not get a 'Set parent' form element.

Is there anything else that needs to be done?

CommentFileSizeAuthor
#6 og_subgroups.patch1.24 KBravi_sam

Comments

ezra-g’s picture

Status: Active » Fixed

Please let us know if this happens with the 5.x.4 release which will be available in a few minutes.

rbryer’s picture

Status: Fixed » Closed (fixed)

I have tested in 5.x.4 and I now have the Set parent option.

I'm not sure that it should be on a tab called 'Subgroups'. But I'm not sure what I would call it.

But it seems to work, Thanks.

EmpireNM’s picture

Just installed version 5.x-4.0 of this module and trying to figure out how it works. Maybe this is part of my problem. I didn't see a "set parent" option when creating a group. So far I don't understand how to assign a group to a parent. I've looked at the subgroups tab of a particular group, but in the drop-down option, I only have "top-level" available.

Thanks for all the great work.

EmpireNM’s picture

Sorry, I'm trying to understand this as best as I could. This would be a very useful module if I can get it to work. So want to thank you in advance for the great work.

I finally found an option in the OG User Roles config to "Create link to "Create Subgroup" in group menu?". But in the Subgroups block, the subgroup is not showing. Each group merely lists itself as a subgroup. I also tried the cope snippet the hide the block if there are no subgroups, but then I get nothing at all, even though there is a subgroup now created.

Maybe I have to assign it after I've created it? Sorry, but I don't understand what the "subgroups" tab is for. All I see is a "top level" option, so I am unable to assign it to anything.

Thanks again.

amitaibu’s picture

Version: 5.x-3.3 » 5.x-4.0

1. AFAIK the OG user roles is not updated with the 5.x-4.x release which is a complete rewrite of the previous release.
2. Create several groups then in the select list you should see not only but also the other groups.

ravi_sam’s picture

StatusFileSize
new1.24 KB

I had the same problem as dlivingstone.

On examining the module code, I noticed that there is a call to 'og_node_groups_distinguish()' from 'og_subgroups_get_eligable_groups()'. The former function (of og.module) has an undesirable effect of excluding groups in which the user is a member. This results in exclusion of groups created and administered by the user. This is the reason the select shows only '<top-level>', if the user happens to be the admin for all groups.

I have fixed this error and am attaching the patch. Thanks to the authors for a great module.

ezra-g’s picture

Category: support » bug
Status: Closed (fixed) » Needs review

Changing status

amitaibu’s picture

Was out of town, I'll review this patch in the next few days.

amitaibu’s picture

@ravi_sam,
As we are using in the og_node_groups_distinguish() $exclude_joined=FALSE we get all the groups the user is a member/ admin.

It seems your patch simply duplicates the og_node_groups_distinguish() - or am I missing something there?

ravi_sam’s picture

Amitaibu,

I installed the og.module a few months ago and looks like it is slightly older version (5.x-6.1) in which the og_node_groups_distinguish() does not take a second argument of $exclude_joined. So, the line

$current_groups['accessible'] = array_diff_assoc($current_groups['accessible'], $user->og_groups);

gets applied irrespective of the FALSE value on the second argument. You are right that my patch duplicates og_node_groups_distinguish(), but without the above line. I guess the present og_subgroups.module code should work fine with the latest version of og.module, in view of the facility to specify $exclude_joined as the second argument.

amitaibu’s picture

Status: Needs review » Postponed (maintainer needs more info)

@dlivingstone,
What og.module version are you using? Can I mark it as fixed?

somebodysysop’s picture

Note:

Re #5: OG User Roles has been updated and version 5.x-3.3 release will reflect support for latest og_subgroups 5.x architecture.

amitaibu’s picture

@SomebodySysop, cool thanks.