Missing accessCheck in Dropdown Language Module Causing Entity Query Error

Created on 1 March 2025, about 1 month ago

Problem/Motivation

In the Dropdown Language module, there's a missing access control setting in entity queries. This omission causes a QueryException due to the requirement that entity queries explicitly set access checks, as per Drupal's best practices.

Steps to reproduce

  • Install and enable the Dropdown Language module on a Drupal 10 site.
  • Attempt to view a page where the Dropdown Language block is in use.
  • Observe the QueryException error related to access checks in the logs or on-screen.

Proposed resolution

To resolve this issue, update the entity query within the Dropdown Language module to set access control explicitly by including $query->accessCheck(TRUE);. This will ensure the correct access checking is applied to the entity query.

Remaining tasks

  • Identify the specific file and location within the Dropdown Language module where the entity query is defined.
  • Apply the code change to include accessCheck(TRUE) on the entity query.
  • Test to ensure the error is resolved and the query behaves as expected with access controlled.

User interface changes

No user interface changes are expected as a result of this fix.

API changes

No API changes are anticipated.

Data model changes

No changes to the data model are required.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇹🇷Turkey sametyaman Turkey

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

Comments & Activities

Production build 0.71.5 2024