[wp-trac] [WordPress Trac] #34544: Attaching metadata to shared terms can result in data corruption

WordPress Trac noreply at wordpress.org
Wed Nov 4 21:23:30 UTC 2015


#34544: Attaching metadata to shared terms can result in data corruption
-----------------------------------+---------------------------
 Reporter:  boonebgorges           |       Owner:  boonebgorges
     Type:  defect (bug)           |      Status:  closed
 Priority:  high                   |   Milestone:  4.4
Component:  Taxonomy               |     Version:
 Severity:  normal                 |  Resolution:  fixed
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * resolution:   => fixed


Comment:

 In [changeset:"35515"]:
 {{{
 #!CommitTicketReference repository="" revision="35515"
 Don't allow term meta to be added to shared taxonomy terms.

 `add_term_meta()` and `update_term_meta()` identify terms by `$term_id`.
 In
 cases where a term is shared between taxonomies, `$term_id` is
 insufficient to
 distinguish where the metadata belongs.

 When attempting to add/update termmeta on a shared term, a `WP_Error`
 object
 is returned. This gives developers enough information to decide whether
 they'd
 like to force the term to be split and retry the save, or show an error in
 the
 UI, or whatever.

 Props boonebgorges, mboynes, DH-Shredder, jorbin, aaroncampbell.
 Fixes #34544.
 }}}

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


More information about the wp-trac mailing list