Crashes with 'Argument #1 ($haystack) must be of type string, array given in str_starts_with'

Created on 19 March 2024, 3 months ago
Updated 11 April 2024, 3 months ago

Problem/Motivation

I edited a date facet and changed it to use the processor from this module.

I then reloaded the View that uses this facet and got this crash:

TypeError: str_starts_with(): Argument #1 ($haystack) must be of type string, array given in str_starts_with() (line 50 of modules/contrib/facets/src/Plugin/facets/query_type/SearchApiString.php).

Drupal\facets\Plugin\facets\query_type\SearchApiString->execute() (Line: 167)
Drupal\facets\FacetManager\DefaultFacetManager->alterQuery(Object, 'search_api:views_embed__localgov_directory_channel__node_embed') (Line: 51)
Drupal\facets\EventSubscriber\SearchApiSubscriber->queryAlter(Object, 'search_api.query_pre_execute', Object)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

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

Comments & Activities

Production build 0.69.0 2024