[wp-trac] [WordPress Trac] #33864: Cannot add accented tag if non-accented look-alike exists (eg. szel, szél)
WordPress Trac
noreply at wordpress.org
Sat Oct 3 20:16:39 UTC 2015
#33864: Cannot add accented tag if non-accented look-alike exists (eg. szel, szél)
------------------------------------+-----------------------
Reporter: geza.miklo | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.4
Component: Taxonomy | Version: 4.3
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+-----------------------
Comment (by boonebgorges):
I've been thinking more about this, and I'm less a fan of my previously
suggested approach than I was when I wrote it :) For one thing, adding a
strictness parameter to `get_term_by()` - especially one that is only used
when field=name - is quite ugly and unwieldy. For another thing, I am
concerned about backward compatibility and performance concerns in
`get_term_by()`.
Since this is a very local problem - it only affects the creation of new
terms via `wp_insert_term()` - I think we can go with a more local
solution. Instead of using `get_term_by( 'name' )` to find potential
duplicates, we'll use `get_terms()` with the `name` parameter. This'll
return *all* terms that MySQL deems a match. Then we do a stricter
comparison in PHP before deciding that we've found an actual match. Very
similar in spirit to the `get_results()` approach suggested above, but
much less likely to cause damage.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33864#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list