Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When group administrator attempts to delete the group owner from the group the status message states:"Performed Remove from group on 1 item" and all is green.
Unexpectedly the group owner is not deleted. Internally there is a check that disables the removal of group owner, which is OK, but no message is generated to the user to explain the difference in behavior.
Suggested fix:
Add an error message with appropriate text.
Comment | File | Size | Author |
---|---|---|---|
#1 | og-confusing-message-after-attempt-to-delete-group-owner-2090073-1.patch | 632 bytes | ndobromirov |
Comments
Comment #1
ndobromirov CreditAttribution: ndobromirov commentedUpload of an initial solution patch. Any comments or ideas are welcome.
There is on more idea but I was not able to find a proper place to implement the change because of free time issues :).
If it is possible to disable the checkbox for group owner, when delete action is chosen, thus preventing the user from doing the action in the first place.
Comment #2
ndobromirov CreditAttribution: ndobromirov commentedForget to change the status!
Comment #3
amitaibuThe API shouldn't deal with messages. This is something that should live in OG-UI as a validate handler.
Comment #4
ndobromirov CreditAttribution: ndobromirov commentedHello again and sorry for the late response :]
Well, it sounds good to add this as a validate handler in the UI, but this will be a duplication of the busyness rule that defined the check in the first place here in the API.
Isn't it a better idea to add a hook that will notify the UI module and any other in that matter for the event 'attempted_group_admin_delete'?
With this, groups UI will just need to implement a simple one-line hook with the set message in it. I will post a patch if this solution is accepted.
BR,
Nikolay Dobromirov.
Comment #5
ndobromirov CreditAttribution: ndobromirov commentedDid somebody looked at this for the last 2 months :) ?