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

Created on 18 December 2024, 4 days ago

Problem/Motivation

When trying to delete any Account Type which has a User associated with it, we get the following error message:

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()

Steps to reproduce

  • Add an Account Type.
  • Create a user with that Account Type.
  • Try to Delete Account Type.

Proposed resolution

Add accessCheck() in query.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India abhinavk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024