Domain access: TypeError in hook_node_grants can completely crash site

Created on 14 December 2022, over 2 years ago
Updated 26 April 2023, almost 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

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