Error: Call to undefined method Drupal\search_api\Query\Query::accessCheck()

Created on 28 May 2024, 6 months ago
Updated 13 June 2024, 5 months ago

Problem/Motivation

accessCheck() should be performed on entity queries, but the method does not exist in search_api queries.

I'm just amazed how long this bug has been introduced (11 months) since it breaks the module. See https://git.drupalcode.org/project/search_overrides/-/commit/07ae712ed37518cae1cbccdf2abe47621f25efdf#fe0f1055e0a8d3c324dc26e1369441c782005519_89_89.

Steps to reproduce

Install search_overrides
On /admin/config/search/search_override/add try to autocomplete promoted content. The autocomplete doesn't work and the console show a 500 error: Error: Call to undefined method Drupal\search_api\Query\Query::accessCheck() in Drupal\search_overrides\Controller\Manager->searchIndexes() (line 89)

Proposed resolution

Remove the accessCheck() call on line 89 in Drupal\search_overrides\Controller\Manager.

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇧🇪Belgium fernly

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

Comments & Activities

Production build 0.71.5 2024