[wp-trac] [WordPress Trac] #34544: Attaching metadata to shared terms can result in data corruption
WordPress Trac
noreply at wordpress.org
Wed Nov 4 01:37:54 UTC 2015
#34544: Attaching metadata to shared terms can result in data corruption
-----------------------------------+------------------
Reporter: boonebgorges | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 4.4
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+------------------
Comment (by boonebgorges):
@johnjamesjacoby Thanks for the feedback.
> If the problem is that splitting terms causes metadata to be orphaned
Actually, this is the first time I'd actually thought of the metadata
being orphaned. My immediate concern is a situation like this. Two
taxonomies, `cool_band` and `city`; a term `Chicago` with ID `45`, in each
taxonomy. If you `add_term_meta( 45, 'thumbnail', $photo )`, where
`$photo` is a picture of the Sears Tower, then the thumbnail will also
apply to the `cool_band` Chicago. This is clearly incorrect. More briefly:
the termmeta functions accept only a `$term_id` for identifying a term,
but when terms are shared, `$term_id` is insufficient.
> make more sense to compare to the db_version instead
During the 4.3 update, we trigger the splitting of shared terms in a
separate cron job. `db_version` is, unfortunately, not a reliable
indicator of anything here. `finished_splitting_shared_terms` is what the
4.3 cron job uses to know when it can stop spawning itself.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34544#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list