Opened 6 years ago
Last modified 17 months ago
#47339 new defect (bug)
Tags S and Š
Reported by: | 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 )
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)
Change History (12)
#1
@
6 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
@
6 years ago
The issue is not related to the Block Editor though. Same issue appears using Classic Editor as well.
#5
@
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 ?
#9
@
4 years ago
Solution
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(t.name) = 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
using post tag "Š" in the editor