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

Created on 4 December 2023, 12 months ago
Updated 30 May 2024, 6 months ago

Problem/Motivation

hi
When this version of Varbase style Guide module is enabled on D10+Varbase-9.0.16, accessing the Styleguide tab at Administration \ Appearance \ Styleguide send the below error .
But if only varbase_styleguide is disabled (keeping styleguide module enabled) the Styleguide tab is accessible.

This looks to be related to https://www.drupal.org/project/drupal/issues/3318457 💬 QueryException: Entity queries must explicitly set whether the query should be access checked or not Closed: works as designed

Steps to reproduce

  1. Enable varbase_styleguide
  2. Visit Administration \ Appearance \ Styleguide

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

Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 1513)
varbase_styleguide_styleguide_alter(Array, NULL, NULL) (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('styleguide', Array) (Line: 98)
Drupal\styleguide\Controller\StyleguideController->page()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

🐛 Bug report
Status

Needs work

Version

9.1

Component

User interface

Created by

🇧🇯Benin delacosta456

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

Comments & Activities

Production build 0.71.5 2024