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

Created on 30 April 2024, 7 months ago

Problem/Motivation

With drupal10, entity queries must implement accessCheck if not its causing issue like below;
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 /var/www/html/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php)

Steps to reproduce

Upgrade drupal core 9 to 10

Proposed resolution

implement accessCheck at getEntityForVoting function.

🐛 Bug report
Status

Closed: outdated

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