Problem/Motivation

Getting following 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 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

Steps to reproduce

1. Create Drupal 10.1.x site.
2. Install Broken Link module with composer require 'drupal/broken_link:3.x-dev@dev' command.
3. Go to admin/config/broken_link_redirect
4. "The website encountered an unexpected error. Please try again later." message will be shown.

Proposed resolution

I will attach a patch for this issue below.

Comments

rastepanyan created an issue. See original summary.

rastepanyan’s picture

StatusFileSize
new990 bytes
rastepanyan’s picture

StatusFileSize
new990 bytes

And this patch is for Automated Drupal 10 fork.

keshavv’s picture

StatusFileSize
new106.48 KB

This module is still not ported to Drupal 10 and is working as expected in Drupal9.5
But we need it for Drupal 10 for sure.

rigoucr’s picture

Status: Active » Reviewed & tested by the community

Patch #3 worked for me and also de code makes sense , thank you!