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.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3336859-7.patch | 1.57 KB | rsnyd |
| #6 | 3336859-6.patch | 1.88 KB | rsnyd |
| field_defaults-accessCheck.patch | 1.52 KB | mvogel |
Comments
Comment #3
b_sharpe commentedThanks!
Comment #4
mvogel commentedIt seems you forgot to move the "accessCheck" to the outside of the if clause. And there is a second occurrence in the .module - file (see patch)
Comment #6
rsnydReplacing the accessChecks within the if statements.
Comment #7
rsnyd