JSON API Search API Facets not working in D10

Created on 11 April 2023, over 1 year ago
Updated 7 July 2023, over 1 year ago

Problem/Motivation

When the JSON API Search API facets module is enabled and used on D10 builds all JSON API Search Api requests fail with the error "input value 'page' contains a non-scalar value". The problem arises because D10 is now using Symfony InputBag and that requires all parameter fetches to return a scalar value. The 'page' parameter on JSON API requests is actually an array containing both 'offset' and 'limit' values which causes the non-scalar error.

The page parameter is fetched in jsonapi_search_api_facets/src/Plugin/facets/url_processor/JsonApiQueryString.php line 125 where the page offset value is removed from the parameters.

Steps to reproduce

On D10 installation enable json_search_api_facets and crate a json api facets. Now any request to JSON API Search index will report an error if page[offset] and page[limit] are present in query string.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom dippers

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

Comments & Activities

Production build 0.71.5 2024