Make WordPress Core

Opened 5 years ago

Last modified 11 months ago

#47339 new defect (bug)

Tags S and Š

Reported by: colics's profile Colics Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2
Component: Taxonomy Keywords: needs-patch has-screenshots
Focuses: administration Cc:

Description (last modified by sabernhardt)

I've made tags with initial letters ...
So i have two tags "S" and "Š" (slug "s" and "s-2").
When I try to add the tag "Š" in the post, after I save the post WP, I tag "S" instead of "Š"?
Is this a mistake or how can I fix my problem by adding the tag I want?

The same problem is with letters

  • C, Č and Ć
  • Z and Ž

Attachments (2)

Capture d’écran 2019-05-21 à 17.03.07.png (12.2 KB) - added by audrasjb 5 years ago.
using post tag "Š" in the editor
Capture d’écran 2019-05-21 à 17.02.37.png (21.0 KB) - added by audrasjb 5 years ago.
the saved tag is not "Š" but "S"

Download all attachments as: .zip

Change History (12)

5 years ago

using post tag "Š" in the editor

5 years ago

the saved tag is not "Š" but "S"

#1 @audrasjb
5 years ago

  • Component changed from General to Editor
  • Keywords has-screenshots added

Hello @Colics and welcome to WordPress Trac,

Thanks for the ticket. I can confirm the issue on my side.

#2 @audrasjb
5 years ago

The issue is not related to the Block Editor though. Same issue appears using Classic Editor as well.

#3 @Colics
5 years ago

The same problem is with:

  • "C" and "Ć" and "Č"
  • "Z" and "Ž"

#4 @SergeyBiryukov
5 years ago

  • Component changed from Editor to Taxonomy
  • Focuses administration added

Previously: #33731, #33864.

#5 @audrasjb
5 years ago

@Colics the issue appears to be fixed on my side using current trunk. Maybe a recent change also fixed the issue.
Can you confirm it @SergeyBiryukov ?

#6 @Colics
5 years ago

the problem has not been resolved :(

#7 @sabernhardt
4 years ago

#51593 was marked as a duplicate.

#8 @sabernhardt
4 years ago

  • Description modified (diff)

#9 @Colics
4 years ago

in file wp-includes/taxonomy.php
function term_exists( $term, $taxonomy = , $parent = null ) {
change line
$orderby = 'ORDER BY t.term_id ASC';
with line
$orderby = 'ORDER BY CASE WHEN hex( = hex(%s) THEN 0 ELSE 1 END, t.term_id ASC';

How does this work?
If he finds 100% equal, return it to the first one, if not then still according to the second criterion, ie. t.term_id ASC

Note: See TracTickets for help on using tickets.