Missing 'Set Parents' form element

rbryer - May 11, 2008 - 19:30
Project:Subgroups for Organic groups
Version:5.x-4.0
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

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?

#1

ezra-g - June 14, 2008 - 20:40
Status:active» fixed

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

#2

rbryer - June 17, 2008 - 02:01
Status:fixed» closed

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.

#3

dlivingstone - August 7, 2008 - 22:14

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.

#4

dlivingstone - August 8, 2008 - 18:08

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.

#5

Amitaibu - August 9, 2008 - 20:08
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.

#6

ravi_sam - August 26, 2008 - 13:06

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.

AttachmentSize
og_subgroups.patch 1.24 KB

#7

ezra-g - August 26, 2008 - 23:02
Category:support request» bug report
Status:closed» needs review

Changing status

#8

Amitaibu - August 28, 2008 - 13:13

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

#9

Amitaibu - August 30, 2008 - 09:05

@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?

#10

ravi_sam - August 30, 2008 - 13:42

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.

#11

Amitaibu - August 30, 2008 - 14:42
Status:needs review» postponed (maintainer needs more info)

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

#12

SomebodySysop - September 2, 2008 - 01:48

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.

#13

Amitaibu - September 2, 2008 - 06:47

@SomebodySysop, cool thanks.

 
 

Drupal is a registered trademark of Dries Buytaert.