Problem/Motivation
WSOD error visiting site audit reports (/admin/reports/site-audit/reports):
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).
Proposed resolution
Requires access check in site_audit/site_audit_report_entity/src/SiteAuditReportListBuilder.php load():
public function load() {
// Sorting my entities.
$entity_query = \Drupal::entityQuery('site_audit_report')
->sort('created' , 'DESC')
->accessCheck(FALSE);
...
| Comment | File | Size | Author |
|---|---|---|---|
| site-audit-access-check.patch | 649 bytes | robcarr |
Issue fork site_audit-3404964
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3404964-2
changes, plain diff MR !12
- 3404964-entity-queries-to
changes, plain diff MR !11
Comments
Comment #6
rajab natshahI am facing the same issue.
Thank you, Rob, for the fix
Comment #7
rajab natshahComment #8
rajab natshahComment #9
adwivedi008 commentedI was also facing the issue and can confirm MR12 fixes the issue
Comment #12
froboyReviewed and tested. Thanks.
Comment #13
froboy