Drupal 10 | Entity queries must explicitly set whether the query should be access checked or not

Created on 20 September 2023, over 1 year ago
Updated 24 October 2023, about 1 year ago

Problem/Motivation

I have this error in my code.

Entity queries must explicitly set whether the query should be access checked or not

Drupal\Core\Entity\EntityStorageException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck(). in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

From stacktrace I find error come from this module.

Proposed resolution

Follow https://www.drupal.org/node/3201242 steps

Remaining tasks

Find all entityQuery and add accessCheck(TRUE)

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇷France vanilla-bear

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

Comments & Activities

Production build 0.71.5 2024