Received an error when trying to create a new nbox message:

Error: Call to a member function hasPermission() on null in Drupal\nbox\Entity\Access\NboxAccessControlHandler->createAccess() (line 24 of /docroot/modules/contrib/nbox/src/Entity/Access/NboxAccessControlHandler.php) #0
/docroot/core/lib/Drupal/Core/Entity/Controller/EntityController.php(141): Drupal\nbox\Entity\Access\NboxAccessControlHandler->createAccess('message', NULL, Array, true) #1
[internal function]: Drupal\Core\Entity\Controller\EntityController->addPage('nbox') #2

Changing the createAccess() function to checkCreateAccess() seems to work fine, no errors thrown anymore.

CommentFileSizeAuthor
nbox-create-access-check.patch752 bytesmariusilie

Comments

mariusilie created an issue. See original summary.

  • botris committed 386ef03 on 8.x-1.x authored by mariusilie
    Issue #3083241 by mariusilie: Permission error when creating a new...
botris’s picture

Status: Active » Fixed

Thank you, patch has been committed.

Status: Fixed » Closed (fixed)

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