Invalid URI: A URI must not start nor end with ASCII control characters or spaces.

Created on 22 April 2025, about 1 month ago

Problem/Motivation

I get this error when try to do a search

Invalid URI: A URI must not start nor end with ASCII control characters or spaces.

I insert a text with space at the end.
request https://localhost/facets-block-ajax?_wrapper_format=drupal_ajax
send

facet_link "https://localhost/search?search_api_fulltext=E10%2FB%2025%20N44X75%20"

and response return error.
Thank you

Steps to reproduce

Add search field block
Insert text with space at the and
Click on search button

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇹Italy trickfun

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

Comments & Activities

  • Issue created by @trickfun
  • 🇮🇹Italy trickfun

    If i click on "create new branch" i go to 404: Page not found

    In ajaxFacetBlockView function of FacetBlockAjaxController file, remove space at the end of $path variable.
    After line 122.
    Something like this

    $path = rtrim($path, '%20');
    

    Thank you

Production build 0.71.5 2024