Problem
I see this error when I enable the module
TypeError : Argument 1 passed to Drupal\group_permissions\GroupPermissionsManager::getOutsiderRoles() must implement interface Drupal\group\Entity\GroupInterface, null given, called in /Users/xxx/dev/xxx/web/modules/contrib/group_permissions/src/Access/GroupPermissionCalculator.php on line 141
Steps to reproduce
- Enable the module
- Create a group
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | group_permissions-3227320.patch | 1.96 KB | olivierg |
Issue fork group_permissions-3227320
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
olivierg commentedSee the patch to solve the issue.
Comment #3
lobsterr commentedYour solution doesn't solve the initial issue why Group Permission entity is without group.
When we calculate permissions, we take only group permission entity. Every group permission entity must have group.
Have tried to reproduce issue on the fresh Drupal instance ?
Comment #4
olivierg commentedI installed a fresh Drupal instance just for a POC and installed modules :
- Group
- Gnode
- Group Content Menu
I created a Group type and a Group Content Menu type without using premissions and roles.
I created a new Group with a Gnode and a Group Content Menu.
After that I installed Group Permissions and try to go in the new "Group permissions" local task on the Group entity.
I did nothing special.
Comment #7
lobsterr commentedThanks for provided information I think I have found the issue.