Group error createAccess() must implement interface Drupal\group\Entity\GroupInterface, null given

Created on 8 November 2022, over 2 years ago
Updated 24 January 2023, about 2 years ago

Problem/Motivation

The latest version does not work with Group module. The version 8.x-1.0-beta6 works, but the version 8.x-1.0-beta7 doesn't work.

The error is shown in normal use of a group, without using the clone function.

Steps to reproduce

A group doesn't work for the following cases:

  • edit a group member
  • add existing content

I obtain the following error:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\group\Plugin\GroupContentEnablerBase::createAccess() must implement interface Drupal\group\Entity\GroupInterface, null given, called in /var/www/html/web/modules/contrib/group/src/Entity/Access/GroupContentAccessControlHandler.php on line 31 in Drupal\group\Plugin\GroupContentEnablerBase->createAccess() (line 297 of modules/contrib/group/src/Plugin/GroupContentEnablerBase.php).
Drupal\group\Plugin\GroupContentEnablerBase->createAccess(NULL, Object) (Line: 31)
Drupal\group\Entity\Access\GroupContentAccessControlHandler->checkCreateAccess(Object, Array, 'group_content_type_37d5960c330ec') (Line: 260)
Drupal\Core\Entity\EntityAccessControlHandler->createAccess('group_content_type_37d5960c330ec', Object, Array, 1) (Line: 170)
entity_clone_entity_access(Object, 'clone', Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'entity_clone') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_access', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_access', Array) (Line: 96)
Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'clone', Object, 1) (Line: 710)
Drupal\Core\Entity\ContentEntityBase->access('clone', Object, 1) (Line: 68)
Drupal\Core\Entity\EntityAccessCheck->access(Object, Object, Object)
call_user_func_array(Array, Array) (Line: 160)

Could you find a solution? Thanks

🐛 Bug report
Status

Needs review

Component

Code

Created by

🇮🇹Italy marco.aresu Cagliari

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024