Open olafgrabienski opened 2 years ago
1. Introduction
From https://modulesunraveled.com/organic-groups-7x-2x/introduction for Drupal 7:
In this series, I'll walk you through the 7.x-2.x version of Organic Groups. This module lets you create groups. A group is simply a collection of content or people. Groups have three basic components:
Group type Group members Group content
Group type denotes which pieces of content should be handled as groups. I'll show you how to create a group content type in Video 1 - Organic Groups Setup.
A group can have one or more associated users, either by subscribing to the group or having been assigned to the group. We’ll refer to these users as the group members, and we'll be talking more about group membership in Video 9: Organic Groups Membership.
The last component is group content. This refers to the articles or other content types that are posted in the group. We’ll take our first look at how to add content to our groups in Video 4 - Configuring Content Types for group “Content create links”.
We’ll also cover group roles, permissions, how to layout our groups using Panels and a whole lot more.
2. Organic Groups setup
See https://modulesunraveled.com/organic-groups-7x-2x/organic-groups-setup.
Install Modules
Enable Modules
Create Group Type (define a content type to be a group):
Notice: Undefined index: target_type in og_ui_form_node_type_form_submit() (line 992 of my-path/modules/og-1.x-2.x/og_ui/og_ui.module) Notice: Undefined index: target_bundles in og_ui_form_node_type_form_submit() (line 993 of my-path/modules/og-1.x-2.x/og_ui/og_ui.module)
Configure Group Content Type (configure the Post content type to to be group content):
admin/structure/types/manage/post/fields/og_group_ref
Add content: Group 1
Save and have a look at node tab "Group" (People etc.)
Add a Post to the Group
Post has a reference link to Group 1. No mention of the post in the group, because group display hasn't been configured.
3. Organic Groups Views
See https://modulesunraveled.com/organic-groups-7x-2x/organic-groups-views.
Enable Modules
Existing Views
Create a View
Create a 2nd group, and visit the Views page.
4. Organic Groups Layout
See https://modulesunraveled.com/organic-groups-7x-2x/organic-groups-layout.
Install modules
Add Layout for Groups
node/%
Add blocks to Layout
og_group_ref
: not available (see next comment)node/NID
)
See issue #80.group_group
), formatter: OG subscribe link
Consider to remove the field from the default display (admin/structure/types/manage/group/display/default)
.Layout the panel
5. Configuring Content Types for group "Content create links"
<a href="/node/add/post?edit[og_group_ref][und][0][default]=[nid]" title="Add a post to this group">Add post</a>
6. Creating Private Groups
See https://modulesunraveled.com/organic-groups-7x-2x/creating-private-groups.
Enable module
admin/reports/status/rebuild
(not sure if necessary).
update: new issue report, https://github.com/backdrop-contrib/og/issues/56Add OG field "Group visibility"
admin/config/group/fields
)Optional: hide OG field on display (not covered in the video):
admin/structure/types/manage/group/display/default
Create a private group
node/add/group
)Result: only members can see the private group and its menu link
7. Working with Content in Public and Private Groups
See https://modulesunraveled.com/organic-groups-7x-2x/working-content-public-and-private-groups.
Drupal:
If you would like to have all content posted to private groups be private, and all content posted to public groups be public, you don’t need to do anything further. That is how group content works by default (with one caveat).
Backdrop:
Note: on my test site, a post added to multiple groups appears multiple times in the "OG content" view. To display it only once, I have changed the view's "Query settings" to "Distinct". See issue #80.
8. Advanced Private Groups
See https://modulesunraveled.com/organic-groups-7x-2x/advanced-private-groups.
Add OG field "Groups content visibility"
admin/config/group/fields
)Optional but recommended: hide OG field on display (not covered in the video):
admin/structure/types/manage/post/display/default
Create a private post
Create a public post in a private group
9. Advanced Public Groups
tba
10. Organic Groups Memberships
See https://modulesunraveled.com/organic-groups-7x-2x/organic-groups-memberships.
Request Group Membership
Manage Membership
Modify group membership
admin/structure/views/view/og_members_admin
)Remove membership
Block membership
11. Global OG Group Permissions
See https://modulesunraveled.com/organic-groups-7x-2x/global-og-group-permissions.
Have a look at the permissions:
admin/config/group/permissions
)In the video follows a quick overview of Group permissions which will be treated more detailed in a follow-up episode.
Comparing the video and my Backdrop test site, the mentioned OG permissions in Drupal and Backdrop seem to be the same.
12. Organic Groups Global Roles
See https://modulesunraveled.com/organic-groups-7x-2x/organic-groups-global-roles.
Have a look at the roles:
admin/config/group/roles
)Add more roles:
View the roles in the context of an existing group:
13. Global OG Group Content Permissions
See https://modulesunraveled.com/organic-groups-7x-2x/global-og-group-content-permissions.
Check the permission to administer all groups and permissions.
admin/people/permissions
)admin/config/people/permissions
)Configure member's permissions
admin/config/group/permissions
)Give a group member the "Content creator" role
Switch the account, and create a Post
Switch back, and configure Content moderator permissions
admin/config/group/permissions
)Give a group member the "Content moderator" role
Switch the account, and edit or delete posts from others
Switch back, and configure Content moderator permissions again
14. Group Specific Roles
See https://modulesunraveled.com/organic-groups-7x-2x/group-specific-roles.
Configure roles for specific groups
admin/config/group/fields
)admin/structure/types/manage/group/display/default
Create role for specific groups
15. Group Specific Permissions
tba
16. Organic Groups Settings
tba
17. Organic Groups Field Access
tba
18. Adding Additional Group Types
tba
See also the comment by @schoenid, https://github.com/backdrop-contrib/og/issues/45#issuecomment-1118149612.
- Working with Content in Public and Private Groups ... Backdrop:
- Content posted to public groups is public
- Content posted to private groups is ... public (!)
Just confirmed.
I've added some content to a private group:
While creating a new content with setting Use group defaults
it is still public. After editing the content, the setting was on Public - accessible to all site users
. (strange ...)
Use group defaults
it's state was stable and the content was private.Not the same for Private - accessible only to group members
... after creating, the setting was correct at Private ...
, but the content is public, altough the correct setting, while displaying the visibility.
Could this be a caching problem? I flushed the cache, but without any result in this behaviour.
Could this be a caching problem? I flushed the cache, but without any result in this behaviour.
It's not actually that (regular) cache, what it needs is a permission rebuild (via /admin/reports/status/rebuild). Many permissions are correct after that - possibly not all.
Thank you for the notice.
... what it needs is a permission rebuild ...
Ok. I see, for the moment everytime a new content is added, the permissions are required to be rebuilt ... or it has to be saved twice.
It's not enough, to rebuild the permissions cache once after installing Organic Groups, because there are new ones for the new content. That's what I didn't realize.
This seems to be a similar problem like Editing book child content failure (Bug) #46 - just on another scope. (It "feels" similar on my side.)
for the moment everytime a new content is added, the permissions are required to be rebuilt ... or it has to be saved twice.
That clearly sounds like a bug. Might take a little time to dig into this. I'm not sure yet, in how far the book (outline) bug is related. Hopefully we'll figure out.
Just to let you know ...
I've got now 3 Backdrop sites up and running, each with the Organic Groups module as a base for main content.
It feels great, not only to use it to handle groups of users, but also groups of content. Groups as a content container for thematics or genres and books for content gives me an extraordinary possibility to maintain content in hierarchies.
On the other side, to have groups with members feels really like working in a company with different divisions or like a school with different classes: all are working mainly independent, but in the same community.
While working with additional "Group Types" (your Pt. 18), I've realized the following:
While working with additional "Group Types" (your Pt. 18), I've realized the following
Thank you, very helpful! I'll have another look soon.
👎 On contents only the groups of the first bundle are listed. A selection of other bundles is not possible.
@schoenid there seems to be a bug in Drupal's OG which transferred to Backdrop. Check out the minute 1:51 of the video tutorial for step 18. The video shows that the target bundle was not selected, even though in a previous step, when adding the group content field, the author had selected "Video series".
Would it be possible that perhaps your issue arouse from the fact that you did not re-select the bundle during that step? I will take a look and see why the bundle selection is not being saved correctly when you do it through the Node Configuration OG vertical tab. In the meantime, would you mind check that again?
@schoenid - I've followed video 18 to test the bug you reported. I can verify that the step in minute 1:50 is very important. Apparently there is a bug in both D7 and Backdrop that results in the target bundle not being saved when you select it from the vertical tab in the ""Configure" of the node UI. So what happens then is that you have to go and open "Manage fields" for that node, and then configure the Group Audience field itself to select the correct bundle.
After this, when you create group content, you will be able to select only the groups that belong to that particular bundle.
I will open a separate issue to fix the problem of the bundle not being saved in the node configuration page.
Would it be possible that perhaps your issue arouse from the fact that you did not re-select the bundle during that step? I will take a look and see why the bundle selection is not being saved correctly when you do it through the Node Configuration OG vertical tab. In the meantime, would you mind check that again?
I've selected that bundle correctly. I also selected the group on a re-edit base, even in the field management form of the group nodes content type. But this is working, if only one group is selected.
If you select two, out of a list of maybe 10 content-groups (multiple selections), the content can only be assigned to the first selected Target bundle. The other selected bundles or content groups do not show up in the content, where you could assign it.
As example: I configure "Posts" to be assigned to "Editor-Groups" and "Author-Groups" but not to "Visitor-Groups", so "Posts" should be group content belonging either to "Editor-Groups" or "Author-Groups". But only the first one "Author-Groups" is listed. So I can add Posts-content only to groups of type "Author-Groups", but not to groups of type "Editor-Groups".
As a workaround I could create a new content type: "Posts for Editors" - but this would not be a professional solution.
Thanks @schoenid. This looks like a bug. We should open a new issue for that to investigate a specific solution for that. Feel free to start a new issue.
I'm follwing the Drupal 7 tutorial from https://modulesunraveled.com/organic-groups-7x-2x to test Organic Groups. I'll add more comments to report how the module works in Backdrop.
Table of content