Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to remove group members (Bug) #43

Closed
schoenid opened this issue Feb 26, 2022 · 9 comments · Fixed by #53
Closed

Not possible to remove group members (Bug) #43

schoenid opened this issue Feb 26, 2022 · 9 comments · Fixed by #53
Labels
bug Something isn't working

Comments

@schoenid
Copy link

While trying to remove a group member, the notification "The membership was removed." occurs, but the member is still there.
It's state can be changed to pending, active or blocked without problems.
On states pending or active the member itself has the option to "Unsubscribe from group". If that link is clicked, the "Unsubscribe" button appears, but after clicking it, the membership is not removed.

Backdrop CMS | 1.21.2
No messages in log reports.

@schoenid schoenid changed the title Not possible to remove group members Not possible to remove group members (Bug) Mar 22, 2022
@olafgrabienski
Copy link
Member

Just confirmed while testing #45 (comment).

Not sure if it's related, but in Drupal you can see the system action "Remove from group" (og_membership) in the user interface. In Backdrop, Actions have been changed, and I don't know how to check if that action still exists.

@indigoxela
Copy link
Member

indigoxela commented Apr 9, 2022

Also confirmed, and it's a one-liner fix actually. It turned out that OgMembership extends (core) Entity, but doesn't override function id().

In includes/og.membership.inc:

class OgMembership extends Entity {
  /**
   * Implements EntityInterface::id().
   */
  public function id() {
    return $this->id;
  }

A PR has to wait until a regression from my previous PR gets fixed (unrelated issue).

@indigoxela
Copy link
Member

A PR is now available for testing and review: #53

@indigoxela indigoxela added the bug Something isn't working label Apr 9, 2022
@olafgrabienski
Copy link
Member

Great, many thanks for the PR! I can test it probably Monday.

@olafgrabienski
Copy link
Member

olafgrabienski commented Apr 11, 2022

I've tested the PR. I guess it doesn't fix the issue, or only partly. Steps to reproduce:

  • As admin, go to the People page of a group, e.g. group/node/5/admin/people.
    You see a list of group members.
  • Click the "remove" link next to a member.
    Note: I'm not sure, but IIRC the "remove" link was missing before the PR. I guess, this is the fixed part.
  • On the confirmation page, click the "Remove" button.
    You return to the People page, and see the message "The membership was removed."
    However, the 'removed' member is still there (part of the list).

@indigoxela
Copy link
Member

@olafgrabienski many thanks for testing.

A question: how did you apply the patch? Did you verify the code is there? Important: did you flush caches?

@olafgrabienski
Copy link
Member

Did you verify the code is there?

Ha, caught me! Actually, I missed to apply the patch (got confused while changing something else on the test site).

And: after applying the patch, I am able to remove the group member, so the PR works for me!

(Tested both the "remove" link as admin, and the "Unsubscribe from group" link as member.)

indigoxela added a commit to indigoxela/og that referenced this issue Apr 11, 2022
@schoenid
Copy link
Author

Great !!!
Just works fine on my home installation.

Thanks very much.

@laryn laryn closed this as completed in #53 Apr 12, 2022
laryn pushed a commit that referenced this issue Apr 12, 2022
@laryn
Copy link
Member

laryn commented Apr 12, 2022

Thanks for the report (and testing) @schoenid, and the PR @indigoxela! Thanks for testing @olafgrabienski! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants