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

Created on 16 September 2023, about 1 year ago
Updated 31 October 2023, about 1 year ago

Problem/Motivation

Getting following error:

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/docroot/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

Steps to reproduce

1. Create Drupal 10.1.x site.
2. Install Broken Link module with composer require 'drupal/broken_link:3.x-dev@dev' command.
3. Go to admin/config/broken_link_redirect
4. "The website encountered an unexpected error. Please try again later." message will be shown.

Proposed resolution

I will attach a patch for this issue below.

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇧🇬Bulgaria rastepanyan

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

Comments & Activities

Production build 0.71.5 2024