[wp-trac] [WordPress Trac] #28058: Taxonomies defined with UTF8 encoded names cause notices when adding a new term

WordPress Trac noreply at wordpress.org
Tue Apr 29 12:18:44 UTC 2014


#28058: Taxonomies defined with UTF8 encoded names cause notices when adding a new
term
----------------------------+-----------------------------
 Reporter:  mikejolley      |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Taxonomy        |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 This one is easy to reproduce as follows:

 1. Register a new taxonomy with UTF8 in the name, e.g.  pa_資料庫版本.
 This is in particular possible in WC for its attribute system.
 2. Add a term via the admin panel
 3. You get notices like:

 {{{
 Notice: Trying to get property of non-object in
 /Users/patrick/Documents/woothemes/woocommerce/wp-includes/link-
 template.php on line 685
 }}}

 I traced it back to  https://github.com/WordPress/WordPress/blob/master
 /wp-admin/includes/screen.php#L413

 After adding any term, this sanitize key turns pa_資料庫版本 into just
 'pa', which results in the taxonomy not being loaded because 'pa' doesn't
 exist.

 Removing the sanitize_key fixes the issue so sanitisation could be
 removed, modified, or moved after the taxonomy checks.

 This was originally logged at
 https://github.com/woothemes/woocommerce/issues/5314.

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


More information about the wp-trac mailing list