Make WordPress Core

Opened 10 years ago

Last modified 4 years ago

#31728 new defect (bug)

Search bug (Cyrillic)

Reported by: kazumy's profile kazumy Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.1.1
Component: Permalinks Keywords: reporter-feedback
Focuses: Cc:

Description

There is a bug, when I search something in my WordPress site.

The correct search link should be: http://site.com/search/word.

When I type something in English, the link is correct: http://site.com/search/word.
But when I type something in Bulgarian language (Cyrillic), the link is different: http://site.com/?s=абвгд.

The structure of my WordPress permalinks is: http://site.com/%post_id%.

Attachments (3)

permalinks.png (55.5 KB) - added by kazumy 10 years ago.
Permalinks settings
search_1.png (43.0 KB) - added by kazumy 10 years ago.
Search results when the search word is Latin
search_2.png (96.4 KB) - added by kazumy 10 years ago.
Search results when the search word is Cyrillic

Download all attachments as: .zip

Change History (6)

@kazumy
10 years ago

Permalinks settings

@kazumy
10 years ago

Search results when the search word is Latin

@kazumy
10 years ago

Search results when the search word is Cyrillic

#1 @swissspidy
9 years ago

  • Keywords reporter-feedback added

Hey there, is this still happening using the latest version of WordPress (4.4)?

I thought there was some reason for such a behaviour, but I'm not able to reproduce this on a local install at the moment and can't find any source.

#2 @designsimply
7 years ago

@kazumy is the problem that the search results are different between "/search/проба" and "/?s=проба" or is the problem that you expected the permalink to be "/search/проба" instead of "/?s= проба" when you use the search widget in the sidebar to search for text?

I tested just now and when I use the search widget in the sidebar on a site running WordPress 4.8, the format of the URL is always "/?s= проба" regardless of whether I search for an English word or a word in Cyrillic.

It's highly possibly I am not testing exactly the same thing as you though. Can you tell me if your steps are different or if I am missing a setting change or sample content I should add in order for the test to be valid?

My testing steps:

  1. Go to WP Admin > Settings > Permalink.
  2. Set "Custom Structure" to "/%post_id%" and click "Save Changes."
  3. Add the search widget to the sidebar if it's not already there.
  4. Publish a post containing Cyrillic words in it, i.e. "проба".
  5. Search for "проба" by entering it into the search widget in the sidebar.
  6. Check the format of the URL whether it is "/search/проба" or "/?s=проба".

Results: when using the search widget in the sidebar, a search for an English word such as "poetry" or a Cyrillic word such as "проба" both result in a URL format of "/?s=проба".

More testing steps:

  1. Publish a post containing Cyrillic words in it, i.e. "проба".
  2. Go to example.com/search/проба
  3. Go to example.com/?s=проба
  4. Check to see if the search results are the same.

Results: a search with URL format "/search/проба" and URL format "/?s=проба" return the same search results.

Tested with a site running WordPress 4.8 and default plugins (Akismet, Hello Dolly) hosted at Bluehost (PHP 5.4.24).

#3 @pauljacobson
4 years ago

Hello there @designsimply @swissspidy and @kazumy

I am a WordPress.com Happiness Engineer, and I encountered a related issue in WordPress 5.4.x (I believe we're running 5.4.2 at the moment). I just reported the issue in #46059 before I saw that this issue is more relevant.

In this case, the user reported a different set of results using ?s=кофе and ?s=Кофе where the initial capitalization of the search terms, кофе and Кофе produced different numbers of search results.

Our reference for this is 3118235-zen

Note: See TracTickets for help on using tickets.