Make WordPress Core

Opened 4 years ago

#50229 new defect (bug)

slugs aren't allowed as long as they're in different taxonomies.

Reported by: trasweb's profile trasweb Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.1
Component: Taxonomy Keywords:
Focuses: Cc:



I write relative to a bug in taxonomies. From [WP 4.1, duplicate slugs are allowed as long as they're in different taxonomies]( However, this isn't currently so.


Taxonomy one with two terms: "one1", "one1-2". Both are slug.
Taxonomy two with a term: "one1"( slug )

  1. I create term with slug 'one1'.
  2. Checking of duplicated slug is in [wp_unique_term_slug]( )
  3. [if is true](, so that needs_suffix is true.
  4. Query result of [line 2758]( is a row( 'one1' of Taxonomy two )
  5. one1-2 is $alt-slug in [L2764](
  6. Finally, query in [L2766]( returns a row( "one1-2" of Taxonomy 1 ).

Conclusion: same slug with two different taxonomies aren't allowed.

Maybe, queries in this method, should be replaced with get_term_by in order to check also taxonomy.

Manuel Canga

Change History (0)

Note: See TracTickets for help on using tickets.