When using the JSON:API Search API in Drupal, an error occurred when adding query parameters such as page[limit].
JSON:API Search API
This module adds JSON:API resources that allows you to query your Search API indexes using the JSON:API spec.
Specifically, the following error message was displayed.
Input value "page" contains a non-scalar value.
Upon investigation, this was also mentioned in the following issue.
Fix getting of page query params for D10 / Symfony 6
After upgrading to D10, a search query that specifies page (limit and offset) params, like: https://MYSITE/jsonapi/index/solr_node_index?filter[fulltext]=MYQUERY&include=MYFIELD&page[limit]=10&page[offset]=0 is triggering this error: Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Input value "page" contains a non-scalar value. in Symfony\Component\HttpKernel\HttpKernel->handle() (line 83 of /var/www/webroot/vendor/symfony/http-kernel/HttpKernel.php).
Since it was fixed in the development version 8.x-1.x-dev, I replaced it with the following.
jsonapi_search_api 8.x-1.x-dev
As a result, the error was resolved.
Whether to use the development version of the module requires consideration, but I hope this is helpful for those experiencing the same issue.




Comments
…