Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

Setup

  • Solr version: 8.x
  • Drupal Core version:10.1.7
  • Search API version: 8.x-1.31
  • Search API Solr version: 4.3.1
  • Configured Solr Connector: 8.11.2

Issue

I am not able to render the results on search page based on filters and keywords. I am able to view the search page, index the contents and the contents are getting listed by default, but not able to apply any filters. Getting this error on UI "Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1716224 bytes) in /app/web/core/lib/Drupal/Core/Database/StatementWrapperIterator.php on line 110" .
And I can see multiple client error is dblog: Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Input value "f" contains a non-scalar value. in Symfony\Component\HttpKernel\HttpKernel->handle() (line 83 of /app/vendor/symfony/http-kernel/HttpKernel.php).

Comments

Venkatraman Ganesan created an issue. See original summary.

venkatraman ganesan’s picture

Everything worked fine in D9, started facing issues after D10 upgrade.

buuza’s picture

I'm having the same issue after upgrading to D10. It is related to Facets module not being able to process array in GET request when running search filters:
Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Input value "f" contains a non-scalar value. in Symfony\Component\HttpKernel\HttpKernel->handle() (line 83 of /var/www/html/docroot/vendor/symfony/http-kernel/HttpKernel.php).

mkalkbrenner’s picture

Status: Active » Closed (duplicate)

This is not a Search API Solr issue but a facets issue.
In fact it is an incompatibility with newer symfony versions that has been fixed in facets 3.x

benstallings’s picture

Status: Closed (duplicate) » Active

@mkalkbrenner I want to believe you, but upgrading to Facets 3 did not help me, deleting the facet block did not help, and indeed uninstalling Facets module did not help. I am still getting the error without Facets installed. So this cannot be just a Facets issue.

What does help me is removing the exposed filter that is mentioned in the error.

benstallings’s picture

I did however find that the exposed filter works correctly in the Views preview, just not in the rendered page. So perhaps it's a problem with core Views or one of my other Views modules and not a Search API Solr issue. I'll see what I can find out tomorrow, and when I have an issue that this is a duplicate of, I will change it back to Closed (duplicate).

mkalkbrenner’s picture

OK, thanks for keeping us informed.

benstallings’s picture

Status: Active » Closed (duplicate)
Related issues: +#3414404: BadRequestHttpException: input value contains a non-scalar value

The problem is in a Symfony 6 component with the unenviable name of "InputBag." As documented at https://stackoverflow.com/questions/77230889/how-do-i-fix-symfony-6-erro... , anyplace in the code that calls `$form->submit($request->request->get($form->getName()));` on a field with multiple values needs to now say `$form->submit($request->request->all($form->getName()));` or it will throw this error.

In my case, the offending code turned out to be in smart_date_recur module, so I'm marking this as a duplicate of a new ticket, https://www.drupal.org/project/smart_date/issues/3414404

However, there are very likely other modules that are using get() instead of all() on form fields that submit multiple values.

ptsimard’s picture

Thank you @BenStallings!!

I just ran into this 2 minutes ago and your comment was very timely! Changing from get() to all() did indeed fix it.

milosr’s picture

Thanks @BenStallings

In my case, I had a problem with facets in my custom code, which was called like this:

$request->query->get('f')

So, I changed it to this, and it works:

$request->query->all('f')