Problem/Motivation
in this commit, we introduce a new logic for handling custom permissions and permission_callbacks.
https://git.drupalcode.org/project/group/-/commit/9731a11215bb2475112b124f8079a3b8930ab7a7#8ec9ca2c49ac1608f35db346dba0a8f345e86c39_204_206
but unfortunately this logic doesn't work correctly and permission_callbacks stays in permission array, what is causing warnings:
Warning: Undefined array key "title" in web/modules/contrib/group/src/Access/GroupPermissionHandler.php line 183
Steps to reproduce
1) add [module_name].group.permissions.yml file to your module
2) the file should provide custom permission callback:
permission_callbacks:
- Drupal\[module_name]\Controller\GroupPermissionsController::permissions
3) Add GroupPermissionsController and method for it
Comments
Comment #3
lobsterr commentedComment #4
jeslin.shaji commentedI got the same warning in a View where I had configured access using Group permission. The changes mentioned by @LOBsTerr fixed the issue.
Comment #5
lobsterr commentedComment #6
kristiaanvandeneyndeThis is fixed in 2 and 3, but not in 1 which is EOL. Not sure how to proceed, I've added tests for this to the 2 and 3 branch just now.
Comment #7
lobsterr commentedAccording to statistics, it is still alive 12 000 downloads! I can propose to collect the tickets like this, which can be easily fixed and I hope we still have a small releases :)
Comment #8
kristiaanvandeneyndeIf you can help out with that, sure. The reason it's EOL is because the API between v1 and v2/3 differs greatly and it's a nightmare to deliver new features on v1 using the old API. So I have to dedicate what resources I have to v2/3.
Having said that, I do expect people to at least upgrade to v2 when it's out of beta.
Comment #9
lobsterr commentedYou don't have to explain me about support hell. I am currently maintain 5 modules group related and for all of them has two versions :)
The only module, which works for both versions is group_permissions!
Comment #10
andras_szilagyi commentedI confirm the issue is still present and that the patch solved it. I got the error using gcontent_moderation, same errors when visiting the group permissions page, the patch fixed it.
Comment #11
zeip commentedWorks for us also. It'd be nice to get a new 1.x release for this and other issues or if the 1.x version is indeed EOL, it should be marked as unsupported to urge users to upgrade. At least for us this bug breaks the permissions view so I'm setting the priority up to major per the issue priority guidelines.