[wp-trac] [WordPress Trac] #20765: get_attachment_fields_to_edit() returns term->name rather than term->slug, causing conflicts between terms

WordPress Trac wp-trac at lists.automattic.com
Sun May 27 16:14:56 UTC 2012


#20765: get_attachment_fields_to_edit() returns term->name rather than term->slug,
causing conflicts between terms
--------------------------+-----------------------------
 Reporter:  eddiemoya     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 When adding support for taxonomy to attachments, the media page will
 automatically add a simple text field for entering comma delimited list of
 terms. This works fine, and appears to handle slugs as well as names
 entered.

 However, once saved and re-opened, the attachment field will output only
 term names. This leads to conflicts in situations where users have entered
 two slugs for different terms which share the same name.

 This field should be returning slugs or ID's, preferably slugs as they are
 more human-readable, and unlike the category metaboxes this depends on
 manual entry.

 [http://wordpress.org/support/topic/media-categories-2-not-saving-
 correctly-when-two-categories-with-same-name  This bug was found to be the
 cause of a bug reported on one of my plugins]

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20765>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list