core icon indicating copy to clipboard operation
core copied to clipboard

Search not showing results due to escaped values in database

Open madc opened this issue 2 years ago • 1 comments

Details

Question Answer
Relevant Bolt Version 5.0.6
Install type Composer install
PHP version 7.4
Web server Apache

Reproduction

If you're filing a bug, please describe how to reproduce it. Include as much relevant information as possible, such as:

Bug summary

We are using query_search to filter a certain listing page, where the query looks like contenttype?anyField--like=query. This works fine, as long athe query does not contain german umlaute, a "sharps" (ß) or certain special characters like /.

I'm fairly certain, this issue is caused by the encoded values stored in bolt_field_translation. A value containing / would look like ["u-7954\/26"]. For umlaute f\u00fcr is stored instead of für. Changing this values manually in the database makes the records appear in the filter results.

Steps to reproduce

  • Create a content type with a simple text field.
  • Crate a record containing umlaute or slashes.
  • Search for the record in frontend

Expected result

The record should show um in the results.

Actual result

It does not.

madc avatar Nov 08 '21 21:11 madc

Can anybody confirm this issue? I just create a fresh project and can reproduce it right away and was not able to find any workaround.

madc avatar Nov 21 '21 20:11 madc