- Issue created by @kayai
This is the first time I've reported an issue so my apologies if I'm doing it wrong. After updating to Drupal to 10.3.9 from 10.3.6, we started receiving the error below on Search API pages.
Symfony\Component\HttpFoundation\Exception\BadRequestException: Invalid URI: A URI must not start nor end with ASCII control characters or spaces. in Symfony\Component\HttpFoundation\Request::create() (line 371 of /code/vendor/symfony/http-foundation/Request.php).
This would happen when a search was submitted on a Search API Block where the query had a trailing space which would take the user to something like: //mySearchTerm%20 while //mySearchTerm would work fine.
It looks like it's related to this issue:
https://www.drupal.org/project/drupal/issues/3486195 🐛 An update to symfony/http-foundation plus a trailing space took down the views UI Active
I attached a patch that trims the 'keys' on submit, but I'm not a php expert so I'm sure someone else can make it better and more official. Or perhaps this would be addressed later within Drupal Core and this isn't necessary.
Active
1.1
Code