Gutenberg: Searching for and adding existing categories is case-sensitive

Created on 8 Jan 2019  路  6Comments  路  Source: WordPress/gutenberg

Describe the bug
We can only search for and add existing categories to blog posts if we use lowercase letters, uppercase letters (even when they're a part of the original category name) yield no results.

To Reproduce
Steps to reproduce the behavior:

  1. Setup at minimum 8 categories on your website (this is what makes the search feature appear in the blog post editor): https://wordpress.com/settings/taxonomies/category/
  2. Create or edit an existing blog post
  3. Since you have at least 8 categories we will see a search bar available to search for and add categories to this blog post. Screenshot
  4. Search for an existing category, like "festival" in my example. The category will appear, as expected. Screenshot
  5. However, if we search for the same category by entering "Festival" (capital "F") then it will not appear from my list. Screenshot

Expected behavior
In Calypso this behavior did not exist, we could search for use categories by upper or lower case letters regardless of the case used on the original category.

We should be able to type any variant of the category to find and use it from our category list. For example, if the category name is "Festival" then I should be able to find and add it by entering any version:
festival, Festival, FESTIVAL, fEsTiVaL.

Currently we can only enter the all-lowercase version of the word "festival" to get the result. This is confusing to our users, especially when their actual category name has a capital letter (like "Festival") already in it.

Screenshots
Screenshots are inline, above.

Extra information:
This only occurs with categories in Gutenberg, I could not replicate the problem with tags.

Additional context
This problem was originally reported and confirmed on 9351413-hc. The behavior was replicated and tests were compared to Calypso on my own test site.

Good First Issue [Feature] Document Settings [Status] In Progress [Type] Bug

Most helpful comment

Confirmed!

ezgif-4-6f1ae1230ea2

Only works if the characters are lowercase.
...
Please, add support to accented words too.
Ex.:
Searching "educacao" can return "educa莽茫o"
In English it is not necessary, but it is very useful for languages that have words with accents such as Portuguese for example.

All 6 comments

Thank you for the report! I tested with WordPress 5.0.3 and confirmed that searching for categories in anything other than all lowercase does not work.

13250-25s

Confirmed!

ezgif-4-6f1ae1230ea2

Only works if the characters are lowercase.
...
Please, add support to accented words too.
Ex.:
Searching "educacao" can return "educa莽茫o"
In English it is not necessary, but it is very useful for languages that have words with accents such as Portuguese for example.

Hello.

The same issue occurs with tags and any accented string.
In a big website makes gutenberg complete unproductive tool.

Can you please point to search function that returns the list of taxonomies to help identify and fix the issue?
Maybe a remove_accents() function omitted from gutenberg after sending the string to search?

Kind Regards

This Issue should be treated with priority!

Found a case and confirmed it's doing this.

Does #14786 fix the issue?

Was this page helpful?
0 / 5 - 0 ratings