Missing access checks in entity queries

Created on 2 May 2023, over 1 year ago
Updated 11 May 2023, over 1 year ago

Problem/Motivation

During the cron of the submodule log_entity_operations_entity_cron() following exception is thrown:

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 /app/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

Steps to reproduce

1. Enable the module log_entity_operations and its submodulelog_entity_operations_entity.
2. Run the cron with Drush drush cron.

Proposed resolution

Add accessCheck(FALSE) to the entity queries.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland audacus

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

Comments & Activities

Production build 0.71.5 2024