Call to undefined method Drupal\search_api\Item\Item::getAccessResult()

Created on 29 November 2022, about 2 years ago
Updated 20 May 2023, over 1 year ago

Problem/Motivation

Autocomplete callback throws the following error when using the autocomplete field:
Error: Call to undefined method Drupal\search_api\Item\Item::getAccessResult() in Drupal\search_api_autocomplete\Plugin\search_api_autocomplete\suggester\LiveResults->getAutocompleteSuggestions() (line 341 of modules/contrib/search_api_autocomplete/src/Plugin/search_api_autocomplete/suggester/LiveResults.php).

This is a problem when search_api versions older than 8.x-1.14 is used on Drupal 8 sites and the newer access result method isn't included yet in the code. This patch will provide as an interim backwards compatibility for the older code until the sites are upgraded to use the newer versions of both search api and autocomplete.

🐛 Bug report
Status

Closed: won't fix

Version

1.6

Component

General code

Created by

fathima.asmat London, UK

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024