Domain access: TypeError in hook_node_grants can completely crash site

Created on 14 December 2022, over 2 years ago
Updated 26 April 2023, over 2 years ago

The domain_access_node_grants function attempts to load the user account based on the AccountInterface passed into the function. Occasionally, the user load returns NULL and generates the following error for anonymous users:

TypeError: Argument 1 passed to Drupal\domain_access\DomainAccessManager::getAccessValues() must implement interface Drupal\Core\Entity\FieldableEntityInterface, null given, called in modules/contrib/domain/domain_access/domain_access.module on line 54

This is similar to another issue in the domain entity module I reported https://www.drupal.org/project/domain_entity/issues/3322113 โ†’

๐Ÿ› Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom intrafusion Edinburgh, UK

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

Merge Requests

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