Error and warning in combination with fast autocomplete

Created on 7 October 2024, 3 months ago

Problem/Motivation

When using the latests 3.0.x-dev in combination with fast autocomplete the FAC breaks in combination with two warnings and an error in the log.

Warning: Attempt to read property "exposed_widgets" on null in facets_exposed_filters_search_api_query_alter() (line 45 of /var/www/html/htdocs/modules/contrib/facets/modules/facets_exposed_filters/facets_exposed_filters.module)

Warning: Attempt to read property "display_handler" on null in facets_exposed_filters_search_api_query_alter() (line 45 of /var/www/html/htdocs/modules/contrib/facets/modules/facets_exposed_filters/facets_exposed_filters.module)

Error: Call to a member function getOption() on null in facets_exposed_filters_search_api_query_alter() (line 45 of /var/www/html/htdocs/modules/contrib/facets/modules/facets_exposed_filters/facets_exposed_filters.module)

The problem is that Fast Autocomplete uses an object of class \Drupal\search_api\Query\Query which will not be filled with the 'search_api_view' option like is done in \Drupalsearch_api\Plugin\views\query\SearchApiQuery::init().

Steps to reproduce

TBD

Proposed resolution

Not sure whether this should be fixed in Facets or in Fast Autocomplete. I will supply a patch for Facets that will work but it might just mask the effects of an issue in Fast Autocomplete.

Remaining tasks

TBD

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands ricovandevin

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

Comments & Activities

Production build 0.71.5 2024