Drupal 10/ There is no access check in query during delete calendar == 500 error

Created on 30 January 2024, 5 months ago
Updated 17 February 2024, 4 months ago

Problem/Motivation

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).
Drupal\trash\EntityQuery\Sql\Query->prepare() (Line: 80)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 26)
Drupal\google_calendar_service\Form\CalendarDeleteForm->getDeletionMessage() (Line: 61)

// Delete events of the calendar.
$events = \Drupal::entityQuery('gcs_calendar_event')->condition(
'calendar',
$entity->id()
)->execute();

Steps to reproduce

Drupal 10, try delete calendar.

Proposed resolution

Add accesscheck

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇵🇱Poland Pawelgorski87

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