Drupal 10: Entity Query need accessCheck()

Created on 27 January 2023, over 1 year ago
Updated 20 July 2023, 11 months ago

Problem/Motivation

Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked.

Steps to reproduce

See field_defaults.module L123 and following

Proposed resolution

Move ->accessCheck(FALSE) from within the if clause to the outside.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany mvogel

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

Comments & Activities

Production build 0.69.0 2024