backdrop-contrib / og

The Organic Groups module provides users the ability to create, manage, and delete 'groups' on a site.
GNU General Public License v2.0
1 stars 8 forks source link

Testing Organic Groups and adding notes #45

Open olafgrabienski opened 2 years ago

olafgrabienski commented 2 years ago

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

  1. Introduction
  2. Organic Groups Setup
  3. Organic Groups Views
  4. Organic Groups Layout
  5. Configuring Content Types for group "Content create links"
  6. Creating Private Groups
  7. Working with Content in Public and Private Groups
  8. Advanced Private Groups
  9. Advanced Public Groups
  10. Organic Groups Memberships
  11. Global OG Group Permissions
  12. Organic Groups Global Roles
  13. Global OG Group Content Permissions
  14. Group Specific Roles
  15. Group Specific Permissions
  16. Organic Groups Settings
  17. Organic Groups Field Access
  18. Adding Additional Group Types
olafgrabienski commented 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.

olafgrabienski commented 2 years ago

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):

Configure Group Content Type (configure the Post content type to to be group content):

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.

olafgrabienski commented 2 years ago

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.

olafgrabienski commented 2 years ago

4. Organic Groups Layout

See https://modulesunraveled.com/organic-groups-7x-2x/organic-groups-layout.

Install modules

Add Layout for Groups

Add blocks to Layout

Layout the panel

olafgrabienski commented 2 years ago

5. Configuring Content Types for group "Content create links"

See https://modulesunraveled.com/organic-groups-7x-2x/configuring-content-types-group-“content-create-links”.

olafgrabienski commented 2 years ago

6. Creating Private Groups

See https://modulesunraveled.com/organic-groups-7x-2x/creating-private-groups.

Enable module

Add OG field "Group visibility"

Optional: hide OG field on display (not covered in the video):

Create a private group

Result: only members can see the private group and its menu link

olafgrabienski commented 2 years ago

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.

olafgrabienski commented 2 years ago

8. Advanced Private Groups

See https://modulesunraveled.com/organic-groups-7x-2x/advanced-private-groups.

Add OG field "Groups content visibility"

Optional but recommended: hide OG field on display (not covered in the video):

Create a private post

Create a public post in a private group

olafgrabienski commented 2 years ago

9. Advanced Public Groups

tba

olafgrabienski commented 2 years ago

10. Organic Groups Memberships

See https://modulesunraveled.com/organic-groups-7x-2x/organic-groups-memberships.

Request Group Membership

Manage Membership

Modify group membership

Remove membership

Block membership

olafgrabienski commented 2 years ago

11. Global OG Group Permissions

See https://modulesunraveled.com/organic-groups-7x-2x/global-og-group-permissions.

Have a look at the 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.

olafgrabienski commented 2 years ago

12. Organic Groups Global Roles

See https://modulesunraveled.com/organic-groups-7x-2x/organic-groups-global-roles.

Have a look at the roles:

Add more roles:

View the roles in the context of an existing group:

olafgrabienski commented 2 years ago

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.

Configure member's permissions

Give a group member the "Content creator" role

Switch the account, and create a Post

Switch back, and configure Content moderator 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

olafgrabienski commented 2 years ago

14. Group Specific Roles

See https://modulesunraveled.com/organic-groups-7x-2x/group-specific-roles.

Configure roles for specific groups

Create role for specific groups

olafgrabienski commented 2 years ago

15. Group Specific Permissions

tba

olafgrabienski commented 2 years ago

16. Organic Groups Settings

tba

olafgrabienski commented 2 years ago

17. Organic Groups Field Access

tba

olafgrabienski commented 2 years ago

18. Adding Additional Group Types

tba

See also the comment by @schoenid, https://github.com/backdrop-contrib/og/issues/45#issuecomment-1118149612.

schoenid commented 2 years ago
  1. 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:

Could this be a caching problem? I flushed the cache, but without any result in this behaviour.

indigoxela commented 2 years ago

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.

schoenid commented 2 years ago

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.)

indigoxela commented 2 years ago

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.

schoenid commented 2 years ago

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.

schoenid commented 2 years ago

While working with additional "Group Types" (your Pt. 18), I've realized the following:

olafgrabienski commented 2 years ago

While working with additional "Group Types" (your Pt. 18), I've realized the following

Thank you, very helpful! I'll have another look soon.

argiepiano commented 2 years ago

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

argiepiano commented 2 years ago

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

schoenid commented 2 years ago

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.

argiepiano commented 2 years ago

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.