[wp-trac] [WordPress Trac] #46431: wp_unique_term_slug() doesn't guarantee unique slugs for child terms

WordPress Trac noreply at wordpress.org
Mon Aug 26 15:18:51 UTC 2019


#46431: wp_unique_term_slug() doesn't guarantee unique slugs for child terms
--------------------------------------+---------------------------
 Reporter:  saskak                    |       Owner:  boonebgorges
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  5.3
Component:  Taxonomy                  |     Version:  4.3
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------------
Changes (by boonebgorges):

 * owner:  (none) => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45893" 45893]:
 {{{
 #!CommitTicketReference repository="" revision="45893"
 Taxonomy: Fix unique-slug check for terms with parents.

 `wp_unique_term_slug()` appends numeric suffixes when the requested slug
 is
 already in use by a sibling term. Changes introduced in [32837]
 inadvertently
 caused this suffixing to be skipped in cases where the requested slug is
 suffixed with the parent slug, so that it became possible to have two
 terms
 `childslug-parentslug` underneath to the same `parentslug`. We fix this
 regression by ensuring that the numeric-suffix routine runs in all cases.

 Props yashar_hv, saskak, dlh.
 Fixes #46431.
 }}}

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


More information about the wp-trac mailing list