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

Created on 17 November 2023, about 1 year ago
Updated 1 May 2024, 8 months ago

Problem/Motivation

With the latest version I still get this 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 core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

Steps to reproduce

Install a new drupal 10 site
Install redhen: composer require 'drupal/redhen:^2.1@RC'
Enable redhen and redhen and redhen contact

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

This was previously raised in issues:
https://www.drupal.org/project/redhen/issues/3374148 πŸ› QueryException: Entity queries must explicitly set whether the query should be access checked or not Closed: duplicate
https://www.drupal.org/project/redhen/issues/3389687 πŸ› Entity queries must explicitly set whether the query should be access checked or not. Closed: duplicate

Even when I manually patched to address these problems I still couldn't get to a point where things didn't crash. Is there a sequence that the contact, organization, and connection must be enabled and some creation of content types done to have things work?

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Shared

Created by

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

Comments & Activities

Production build 0.71.5 2024