Access checking must be explicitly set on entity queries

Created on 23 June 2023, about 1 year ago
Updated 22 March 2024, 3 months ago

I installed this module as I needed to allow my groups to be either public or private (membership request) without actually making different group types for each. Everything works fine until you actually try to save the permissions of a specific group: Saving (even without modifying the permissions) results into

The website encountered an unexpected error. Please try again later.

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

Based on other issue I found about entity queries ( https://www.drupal.org/node/3201242 ), the accessCheck() call is now always required (Drupal 9.2 and above, I'm using Drupal 10.1.0). Would love to see this getting fixed quick! I tried to find the correct places to add the function call, but I'm farely new with Drupal 8/9/10 code/source and didn't wanna mess up anything too badly.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇮Finland phonkala

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024