Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entries search filter does not support umlauts (and probably other "exotic" chars) #3145

Closed
ul8 opened this issue Jul 24, 2018 · 8 comments
Closed

Comments

@ul8
Copy link
Contributor

ul8 commented Jul 24, 2018

Description

A lot of German language words (and probably most other languages except English) will not be found in the entry/category filters.

Steps to reproduce

  1. Search for any entry with a title containing an umlaut like "ü" - it will not be found.
  2. Try the same with a transliteration such as "ue" and it works.

See https://imgur.com/a/5nTKJVk

Additional info

PHP version | 7.1.18
MySQL 5.7.22
Craft Pro 3.0.16.1

@ul8
Copy link
Contributor Author

ul8 commented Jul 24, 2018

Just noticed the php intl extension isn't installed..this can probably be closed. Will do so once search indices are rebuilt and I can confirm.

@brandonkelly
Copy link
Member

brandonkelly commented Jul 24, 2018

This is happening because element search keywords and search query terms both get normalized into ASCII, and the ASCII replacement could vary depending on language. So if the ü was saved for a German site, it will get normalized to ue. However if your user account’s Language preference is set to English, then ü in your search query will get normalized to u.

I’m guessing if you change your account’s Language preference to German (Deutsch), then your search query will work as expected.

@ul8
Copy link
Contributor Author

ul8 commented Jul 24, 2018

Thanks!

@carlcs
Copy link
Contributor

carlcs commented Dec 15, 2020

It would be nice if the search query got normalized to the current site’s language.

@brandonkelly
Copy link
Member

@carlcs In general it does. Where are you seeing that to not be the case?

@carlcs
Copy link
Contributor

carlcs commented Dec 15, 2020

When searching in the control panel on Element Index pages. In my case I have an entries section with entries which have titles starting with “Tür”.

When users are using German for their control panel language, they can find these entries when searching for tür. If they’re using English, searching for tür isn’t succesfull but searching for tuer is.

What I’m proposing is that it shouldn’t matter what language they have configured, and the normalization of the search query should depend on the language the currently selected site on the Element Index page is using.

@brandonkelly
Copy link
Member

@carlcs Whoops, that’s how it was supposed to work but the selected site wasn’t getting carried all the way to where keywords were normalized. Fixed for the next release.

@brandonkelly
Copy link
Member

@carlcs 3.5.17.1 is out now with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants