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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot 2023-09-18 at 1.26.16 PM.png | 106.48 KB | keshavv |
| #3 | broken_link-3387698-3.patch | 990 bytes | rastepanyan |
| #2 | broken_link-3387698-2.patch | 990 bytes | rastepanyan |
Comments
Comment #2
rastepanyan commentedComment #3
rastepanyan commentedAnd this patch is for Automated Drupal 10 fork.
Comment #4
keshavv commentedThis 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.
Comment #5
rigoucrPatch #3 worked for me and also de code makes sense , thank you!