[wp-trac] [WordPress Trac] #30615: Flat Taxonomy Terms are identified via their slugs and not their names, when saved from the Post Edit Screen

WordPress Trac noreply at wordpress.org
Fri Jan 16 20:26:45 UTC 2015


#30615: Flat Taxonomy Terms are identified via their slugs and not their names,
when saved from the Post Edit Screen
-----------------------------------+-----------------------------
 Reporter:  ArminBraun             |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  4.2
Component:  Taxonomy               |     Version:  4.0
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:  administration
-----------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  2nd-opinion needs-patch => 2nd-opinion has-patch
 * milestone:  Awaiting Review => 4.2


Comment:

 ArminBraun - Your [attachment:tagslugname.diff] is along the right lines.
 In [attachment:30615.diff], I've changed this logic to use the
 `get_terms()` function instead of a direct DB query, and I've moved the
 translation logic to `edit_post()` rather than `wp_set_post_terms()`.
 Regarding this second decision: while it's likely that most people passing
 a comma-separated list of terms to `wp_set_post_terms()` are going to
 unwittingly experience this same bug, it's possible that at least some of
 them are already accounting for it in their own code. Putting the fix into
 `wp_set_post_terms()` could break things for them. By moving the fix into
 `edit_post()`, we can be sure that it only affects the Dashboard
 interface. Do others have thoughts about this?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30615#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list