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

Created on 8 September 2023, about 1 year ago
Updated 22 June 2024, 5 months ago

Problem/Motivation

The "message subscribe example/email" sub-modules are active and I need to use content moderation/workflow modules. But during a moderation process, for example, when I change the status from draft to published, I get the following error.

php

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 /home/jayden/web/j10/public_html/drupal10/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

-----------------
node

Drupal\Core\Entity\Query\QueryException: 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\Query\Sql\Query->prepare() (line 141 of /home/jayden/web/j10/public_html/drupal10/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

When I deactivate the message subscribe example module or the "node update" section within it, the transition completes successfully.
Of course, node update message cannot be created in this case.

Any ideas of using it with Content Moderation, please ?

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024