Problem/Motivation
I downloaded and installed og_subgroups on a test instance of Drupal 7.9. I've enabled it. And I've looked all over trying to figure out how to create a sub group. I can't find anything. The d.o docs don't help, the readme is pretty much empty, and the two issues I was able to find (http://drupal.org/node/1226002 and http://drupal.org/node/1320920) that seemed related didn't help.
So, how do I create a subgroup right after I've enabled the subgroup module?
If you could answer in a way that could transfer to the d.o docs pages, that would be awesome. :)
Attached is a screen shot of my modules page so you can see what versions I have installed, and what is enabled.
| Comment | File | Size | Author |
|---|---|---|---|
| Modules | Lane OG Testing.png | 1.74 MB | jerrac |
Comments
Comment #1
johaziel+1
Comment #2
creact commentedI have the same problem. I can not figure out how to control this module. How do you make a sub-group???
Comment #3
IronWorker commentedwhen you create the node of the group you want, use the group audience to connect it to the group you want to be a sub group of.
Comment #4
creact commentedI shall try that. Thank you for your quick response. It is much appreciated.
Comment #5
creact commentedI am sorry but I can not get this to work at all. Could you give me a step by step? I do not seem to have the subgroup or visibility field options at all.
Comment #6
IronWorker commentedD7 is more flexible but also more obtuse that D6 implementation it appears.
Let's say I have a content type called "District"
First thing you want to do is to go to administration->configuration->organic groups->OG field settings (admin/config/group/fields)
Pick your "District" in the list of content types there.
You should see "Groups Audience" as a field. If you don't, select your node type from the bundles dropdown and in the fields drop down, select "group audience" and save it. If you want to go one further, add "group visibility" and "group content visibility" to it too. This is extra credit.
Back to structure. Edit the "District node type" you should see down at the bottom a group tab under the menu settings tab. Make sure this has "group type" and "not a group content type" -- this marks the thing as a group as opposed to say a group aware article.
Now create a content instance called District 1 from the district type. Mark the node as "group type" and leave the audience field alone. Fill out the rest of it as the mood strikes.
Create another content instance called District 2 from the district type. Mark the node as "group type" but now select "District 1" in the group audience field.
You've now made District 2 a subgroup of District 1.
Getting this to flow between them is another trick in D7 that I haven't mastered largely because og_subgroups for D7 is still in a state of flux. I haven't tried doing anything with this lately but it documentation looks like it's working better than it used to (which wasn't at all except for permissions).
Comment #7
creact commentedI will try this asap. Thank you so much for your time. I appreciate it more than you know. Drupal frustrates the hell out of me since I am more of a visual person and need everything in one place and "touchable"...
Thanks again.
Comment #8
creact commentedIronWorker,
You are MY HERO. Finally this thing makes sense... well mostly... and I learned a lot about drupal core in the process too.
Thank you so much for your patience and common sense approach. You are awesome !
Comment #9
IronWorker commentedyou bet.
Just helping out a fellow traveler in this very confusing jungle...
Comment #10
newmember commentedIronWorker, this was a great step by step process. Thanks
The idea of adding "group visibility" and "group content visibility" is interesting and at first well hidden, but the OG is looking cool for D7.
In D6 there was an option for setting permissions on groups between groups, siblings, parents, children could see the content of that group. Is there a similar thing in D7?
EG:
District (Group)
\--Block (Group)
\---House (Group)
\--Family (node)
If I add a Family node to House group and House group is a child to Block and child to District, that when I add Family automatically District would see the Family node IF I had set "Parents" in the hierarchy permissions.
Thanks
Chris
Comment #11
IronWorker commentedNot an expert in this subject but:
Supposedly the relationships of groups will roll down the permissions from parent to child.
Content has until recently not been available on D7. Looking at some of the recent posts in this module, the functionality is just starting to get there for getting content to show up and down the chain.
Best thing is to try it and see if it works yet. Didn't awhile ago.
Wish I could be of more help to you
Comment #12
newmember commentedFollow up.
I found lots of discussion about this, I will wait for the module to be updated.
http://drupal.org/node/1342632
http://drupal.org/node/1226002
Thanks
Comment #13
Sinan Erdem commentedIronWorker, at comment #6 you say that:
But on that field, it states that:
Without deleting the "groups audience" field, we cannot remove the check near this. How did you get this work? Did you try adding a user to a group that has a subgroup or parent group? It doesnt work for me. See: #1734526: <code>OgException: OG membership can not be created in entity
Comment #14
webchickJust stumbled over this myself today; thanks for the helpful instructions IronWorker!
Comment #15
scottalan commentedSinan Erdem,
I'm experiencing what you describe in #13...Did you get this sorted out?
Comment #16
Sinan Erdem commentedscottalan, unfortunately i didnt.
Comment #17
mohit_aghera commentedIronWorker,
Thanks for such description.
I am creating subgroups for the group. I have created a content type called 'group'.
I am curious whether can i use same content type for subgroup as well.
If i use the same content type will there be any problem with the groups functionality ?
Comment #18
maxchock commentedI've follow suggestion on #6 but whenever I add the field for Group Audience, it will automatically checked the content type to Group content. Since #6 is quite aged, is it possible the new OG subgroup are different now? By the way i'm using version 2.x dev..
Comment #19
juan_g commented[Deprecated, see an improved procedure in next comment #20]
Yes, both "Group" and "Group content" should be checked for the Subgroup content type, and only "Group" for the Group content type (top level groups). From an interesting article:
"Any type of entity can belong to a group. In fact, the group entities themselves can also be designated as potential content for other groups. If set up this way we could have groups that contain other groups, creating subgroups."
Organic Groups for Drupal 7 | Lullabot
No, I tried it, but according to my tests two content types are needed: The default Group (which can't have a parent) and a new Subgroup (which must have a parent). A very quick procedure, updating the previous one in comment #6, is as follows:
We add a new "Subgroup" content type, cloning the "Group" content type that comes with Organic Groups in e.g. Drupal Commons.
The module Bundle Copy 7.x-2.x-dev adds a new "CLONE" tab (and also "EXPORT" and "IMPORT") to:
Administration > Structure > Content types
In the CLONE tab:
And click in "Clone".
The new content type is created, almost exactly like the original, excepting of course the name "Subgroup" and the machine name "subgroup".
We add our planned change, in:
Administration > Structure > Content types > Subgroup > Edit > Organic Groups
checking "Group content", in addition to "Group", so that a new "Groups audience" field for parent group is automatically created.
And we change the content type description to "Group within another group."
That's all, excepting one very small glitch in:
Administration > Structure > Content types > Subgroup > Edit > Comment settings > Default comment setting for new content
The original was "Hidden" and the copy "Open". Just this one difference, very easy to correct.
All the rest of the content type, the many settings in Edit, Manage Fields, Manage Display, Comment Fields, Comment Display, Panelizer... everything is perfectly cloned.
We can verify:
Administration > Configuration > Organic groups > OG field settings
Subgroup already has the fields "Group", "Group roles and permissions" (like the Group content type), and also "Groups audience" (for parent group).
And we create our groups and subgroups:
Administration > Content > + Add content
All this is done with just Organic Groups. The module Subgroups for Organic groups adds more functionality. As Amitaibu said time ago:
"Subgroups are possible in OG7, but in order to propagate content/ users OG_subgroups7 should be used"
#824016: Subgroup visibility and access inheritance
Comment #20
juan_g commentedTesting more, the previous procedure has a problem, at least for the Drupal Commons distribution (which uses Organic Groups). There are many things in Commons already assigned to organic groups, and not to the new Subgroup type, such as breadcrumbs, blocks for recent activity, group contributors, etc. Everything is ready for the default type, so it's much better to use just one content type for all the published groups, the default "Group" type.
In this improved solution, the two content types needed for a tree of groups are:
As said, the module Bundle Copy 7.x-2.x-dev adds a new "CLONE" tab (and also "EXPORT" and "IMPORT") to:
Administration > Structure > Content types > CLONE
We add a new "Site" content type for Organic Groups, cloning the default "Group" content type. In the CLONE tab:
And click in "Clone".
The new content type is created, almost exactly like the original, excepting of course the name "Site" and the machine name "site".
We also change the content type description to, for example, "Unpublished root of the group tree."
All the rest of the content type, the many settings in Edit, Manage Fields, Manage Display, Comment Fields, Comment Display, Panelizer... everything is cloned, excepting for some minor differences, very easy to correct in:
Administration > Structure > Content types > Site > Edit
Anyway, those minor differences are not important for an unpublished group. A new simple group type without cloning, even with different fields, etc., could be enough for the root. However, cloning opens the option of publishing this top level group as well, if we want it later.
So, the new "Site" type is ready.
Now, we modify the default "Group" type a little bit to accept parents:
Administration > Structure > Content types > Group > Edit > Organic Groups
We check "Group content", in addition to "Group", so that a new "Groups audience" field for parent group is created.
We can verify it:
Administration > Configuration > Organic groups > OG field settings
Group has already the fields "Group", "Group roles and permissions" (like the cloned Site content type), and now also "Groups audience" (for parent group).
And we create our tree of groups:
Administration > Content > + Add content
First we make an unpublished root group with the new Site type, e.g. with the name of our site, and then a tree with all the published groups, with the default Group type, that accepts parents in the added "Groups audience" field.
Now all published groups in the tree have the same full feature set.
Comment #21
juan_g commentedComment #22
juan_g commentedNote: If later Organic Groups (or Drupal Commons?) is patched so that groups can leave the "Groups audience" (parent) field optionally empty to be the top level groups, then the hidden root group could be removed.
Comment #23
juan_g commentedUpdate: I've just verified that the need for a hidden root for the tree of groups is a current Drupal Commons issue. Testing plain Organic Groups without Commons, we can easily create groups with or without parent using the same content type for all groups, in all tree levels.
If you don't have a test site with plain OG right now, you can quickly try it online at http://simplytest.me/
On the other hand, for Drupal Commons with OG, if there is an empty "Groups audience" (parent) field, that is to say for top tree level without parent, Commons doesn't allow it, saying:
Probably there is some workaround, but it's not clear yet.
The main Drupal Commons issue about this problem is:
#2020061: Allow users to create content outside of groups
So, the procedure to create subgroups is much simpler for plain Organic Groups and, when that issue is solved, also for Drupal Commons.
In those cases, no need to clone, only one content type is needed. You can create it for plain OG, but if you already have a "Group" content type, just modify it to optionally have a parent, as follows:
Administration > Structure > Content types > Group > Edit > Organic Groups
We check "Group content", in addition to "Group", so that a new "Groups audience" field for optional parent group is automatically created.
And we create our tree of groups:
Administration > Content > + Add content
Now all groups in the tree have the same full feature set.
And this is it... for Organic Groups, and also hopefully soon for Drupal Commons.
Comment #24
juan_g commentedAnother workaround I've tested, not needed for OG, only for DC until the issue is fixed (it seems that mostly fixed already in dev, and probably in the next stable DC release):
When creating top level groups, the hidden parent explained in comment #20 can be created, with the other group content type (e.g. Site), just for a minute, and deleted immediately, when the new top level groups are ready. In my test, the result is the same as the issue being fixed.
Comment #25
rakesh.gectcrIs the #6 is the working Solution ?
How to create the sub group?
Comment #26
rakesh.gectcr#6 is working...
in Drupal 7 og provides to inherit from another group. Which is not there in the Drupal 6.
Comment #27
aswani commentedHi every one,
I have created a group and assign owner to it and later log in as created group owner and create sub group and assign another owner to it.
Now log in as child group owner for child group owner parent group name as well as child group name also displayed.
But i need to display both groups names to be displayed only for Parent group owner and
only child group name alone to be displayed for child group owner.
Is it possible to do like this by using drupal commons.If anyone knows answer please explain me in step by step process Please
Comment #28
kaizerking commentedI am getting this error when saving the a an item 'diatrict 1'
Comment #29
marty.true commentedA lot of this thread was kind of hijacked for Drupal Commons which is a custom distro, therefore much of what is contained in this thread is irrelevant to the actual question... How do you properly setup subgroups in D7, with a proper tree and with chained permissions?
I have been able to create a group that has group content so in theory, I can assign the (sub) group to another group's audience. But how do the permissions work and how does the tree get built?
Comment #30
juan_g commented@xstatic: The procedure to create subgroups is almost the same for Organic Groups and for the mentioned Commons distro, since it's based on OG.
Steps to do this on Organic Groups were described in comment #6 and simplified in comment #23.
The tree is built by assigning the parent group of each subgroup, using the "Groups audience" field that is enabled in those steps.
As I mentioned in Drupal Answers, the Organic Groups module natively includes subgroup functionality since its Drupal 7 version. However, optionally, the Subgroups for Organic Groups module adds content and membership propagation.
Other optional modules that work with OG subgroups are for example Views tree (to display a now collapsible tree of groups), Crumbs (supporting subgroups in breadcrumbs)...
Comment #31
aguchoca commentedIronworker made my DAY, good instructions!
Comment #32
mpotter commentedA) Not sure why this was re-opened and set to "needs review" when there isn't any patch here.
B) Support requests should never be "Major".
Looks like the instructions were provided and the request was solved.