[wp-trac] [WordPress Trac] #31270: Unexpected slugs for same-title different-parents term creation

WordPress Trac noreply at wordpress.org
Mon Feb 9 23:24:47 UTC 2015


#31270: Unexpected slugs for same-title different-parents term creation
--------------------------+------------------------------
 Reporter:  dd32          |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  4.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by tyxla):

 * keywords:   => has-patch


Comment:

 It appears that when determining the slug (when not specifically provided)
 in `wp_insert_term()`, if there is a term with the same name on any level,
 the slug of that term is used. This can be clearly seen at
 [https://core.trac.wordpress.org/changeset/28733 "[28733]"] - lines
 `2441:2442`. The issue can be resolved if a term with the same name is
 considered only when it is on the current term level. Attached a patch for
 that.

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


More information about the wp-trac mailing list