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

CommentFileSizeAuthor
#2 group_permissions-3227320.patch1.96 KBolivierg
Command icon 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

OlivierG created an issue. See original summary.

olivierg’s picture

StatusFileSize
new1.96 KB

See the patch to solve the issue.

lobsterr’s picture

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

olivierg’s picture

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

  • LOBsTerr committed abbfa09 on 1.0.x
    Issue #3227320 by LOBsTerr, OlivierG: Bug : getOutsiderRoles() must...
lobsterr’s picture

Status: Active » Fixed

Thanks for provided information I think I have found the issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.