For D10 ->accessCheck(TRUE) missing in RandomfrontpageController.php

Created on 24 April 2023, over 1 year ago
Updated 3 August 2023, over 1 year ago

Problem/Motivation

IN Drupal 10
getting below issue on dblog
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/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

Steps to reproduce

Install module on latest Drupal site
go to admin/config/random_frontpage/adminsettings
add the contanttype which need to be set as random page.
navigate to admin/config/system/site-information
and set '/frontpage' on Front page section.
and after setup random_frontpage module.

Proposed resolution

Use accessCheck(TRUE) on query parameter.

I have created the patch for same its working fine on my local drupal 10.0.8 with PHP 8.1.16

🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇮🇳India Shiv_Sharma

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

Comments & Activities

Production build 0.71.5 2024