Fix Entity queries must explicitly set whether the query should be access checked or not in Bootstrap Layout Builder

Created on 14 March 2023, over 1 year ago
Updated 27 July 2023, over 1 year ago

Problem/Motivation

Having the following error after finishing the installation.

Error message
Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck().

Proposed resolution

Have queries over entities changed in the Bootstrap Layout Builder module
With basic accessCheck(TRUE) or pass the needed access check for admins or selected user roles and permissions.

Would you suggest changing access check to accessCheck(FALSE) if needed?

Access checking must be explicitly specified on content entity queries
#2785449: It's too easy to write entity queries with access checks that must not have them

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ✅ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ✅ Code review from Bootstrap Layout Builder team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release bootstrap_layout_builder-2.1.2

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • Issue #3347902 : Fixed Entity queries must explicitly set whether the query should be access checked or not in Bootstrap Layout Builder
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

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

Comments & Activities

Production build 0.71.5 2024