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

Created on 21 March 2024, 3 months ago
Updated 5 April 2024, 3 months ago

Problem/Motivation

The function getXtmReferenceIdJobs generates an error

Noticed exception 'Drupal\Core\Entity\Query\QueryException' with message 'Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck().'

Steps to reproduce

Abort some job with tmgmt i.e. submit form at /admin/tmgmt/jobs/{job_id}/abort route
so code from getXtmReferenceIdJobs

\Drupal::entityQuery('tmgmt_job')->condition('reference', $xtm_reference_id)->execute();

is triggered

Proposed resolution

Add check ->accessCheck(FALSE|TRUE)

Remaining tasks

1. Prepare MR

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

RTBC

Version

6.5

Component

Code

Created by

๐Ÿ‡ต๐Ÿ‡ฑPoland dmitry.korhov Poland, Warsaw

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024