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
CommentFileSizeAuthor
#4 3347902-4.patch3.29 KBrajab natshah
Command icon 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:

Comments

Rajab Natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

StatusFileSize
new3.29 KB

rajab natshah’s picture

Status: Active » Needs review

I went with ->accessCheck(TRUE) ...
But if no access restriction on the query then could be changed to ->accessCheck(FALSE)
What do suggest on this case?

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

  • Rajab Natshah committed 518838ca on 2.x
    Issue #3347902 by Rajab Natshah: Fix Entity queries must explicitly set...
rajab natshah’s picture

Issue summary: View changes
Status: Needs review » Fixed
Issue tags: +bootstrap_layout_builder-2.1.2
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.