Entity queries must explicitly set whether the query should be access checked or not.

Created on 7 August 2024, 3 months ago
Updated 21 August 2024, 3 months ago

Problem/Motivation

If you try to reindex the backlinks in admin/config/content/backlinks there's a php 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() (regel 141 van web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

Access checking must be explicitly specified on content entity queries.

Steps to reproduce

  1. Go to admin/config/content/backlinks
  2. Check some content types
  3. Hit re-index button

Proposed resolution

Add ->accessCheck(FALSE) to query's in BacklinksScanBatch.php

Remaining tasks

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands groendijk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024