[wp-trac] [WordPress Trac] #37975: Duplicate tag names aren't supported

WordPress Trac noreply at wordpress.org
Wed Sep 7 20:32:17 UTC 2016


#37975: Duplicate tag names aren't supported
----------------------------+-----------------------------
 Reporter:  ivankk          |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Taxonomy        |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 WP has an inherent requirement on unique tag names, if there are multiple
 tags with the same name, there is no way to pick which tag to assign.

 Repro steps:
 Create three tags
 name = test, slug = test-1
 name = test, slug = test-2
 name = test, slug = test-3

 Open the post editor and try and search for test, you will have three tags
 with the name test, if you try and add more than 1, you will not be able
 to pick which of the three you're assigning.

 The search: /wp-admin/admin-ajax.php?action=ajax-tag-
 search&tax=post_tag&q=test
 will only return tag names, and those are used to assign the tag to a
 post.

 wp_insert_posts() calls:
 {{{#!php
 if ( isset( $postarr['tags_input'] ) && is_object_in_taxonomy( $post_type,
 'post_tag' ) ) {
   wp_set_post_tags( $post_ID, $postarr['tags_input'] );
  }
 }}}

 https://core.trac.wordpress.org/browser/tags/4.6.1/src/wp-
 includes/post.php#L3238

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


More information about the wp-trac mailing list