[wp-trac] [WordPress Trac] #34544: Attaching metadata to shared terms can result in data corruption
WordPress Trac
noreply at wordpress.org
Thu Nov 5 16:14:58 UTC 2015
#34544: Attaching metadata to shared terms can result in data corruption
-----------------------------------+---------------------------
Reporter: boonebgorges | Owner: boonebgorges
Type: defect (bug) | Status: reopened
Priority: high | Milestone: 4.4
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+---------------------------
Comment (by aaroncampbell):
I was putting together a longer response with examples, but @boonebgorges
got his in first and really hit the same notes I wanted to hit, so I'm
really kind of chiming in with a simple "yeah, that".
I think making a simple way for a developer to see the issue and fix it
(returning a WP_Error) is a great way forward. Especially since this is
new functionality.
The thing I think Boone skipped is that not only can you end up with meta
on a term you didn't expect it on if terms are shared, but you can easily
stomp on your own meta by accident. In [comment:6 his example] of
attaching 'photo' meta to Chicago expecting it to be the city not the
band, imagine if someone were to see the issue and upload a photo of the
band. Meta needs to be attached to a single term, not a (likely
unexpected) cluster of them.
I think the fix in [35515] is a good solution to a rather complex problem.
It allows data integrity while also eliminating most of the (potential)
confusion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34544#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list