[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
Mon Sep 14 14:10:36 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:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The key is the query checking the existence of the keyword. A slight
 modification will make it work:
 See function get_term_by in wp-includes/taxonomy.php

 The query in line 1465 is:

 {{{
 $term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM
 $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id =
 tt.term_id WHERE tt.taxonomy = %s AND $field = %s LIMIT 1", $taxonomy,
 $value ) );
 }}}

 If you add BINARY to the query, then

 {{{
 $term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM
 $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id =
 tt.term_id WHERE tt.taxonomy = %s AND BINARY $field = %s LIMIT 1",
 $taxonomy, $value ) );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33864>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list