[wp-trac] [WordPress Trac] #62997: Put the final nail in the coffin of shared terms

WordPress Trac noreply at wordpress.org
Fri Feb 21 01:02:46 UTC 2025


#62997: Put the final nail in the coffin of shared terms
-------------------------+--------------------
 Reporter:  johnbillion  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  6.9
Component:  Taxonomy     |    Version:
 Severity:  normal       |   Keywords:
  Focuses:  performance  |
-------------------------+--------------------
 Prior to WordPress 4.3, a term with a name that existed as both a category
 and a tag was actually a shared term. Shared terms were phased out in
 #21950 (4.1), #5809 (4.2), and #30261 (4.3). A site that's running 4.3 or
 later does not contain shared terms.

 One item on [https://make.wordpress.org/core/2013/07/28/potential-roadmap-
 for-taxonomy-meta-and-post-relationships/ the taxonomy roadmap from 2013]
 that was never completed was #30262 - combining the `terms` and
 `term_taxonomy` tables to facilitate the simplification of term queries.

 Implementing this appears to be doable. [https://github.com/WordPress
 /wordpress-develop/pull/8354 I have a work in progress PR which is looking
 promising], however it is blocked by the fact that WordPress still
 supports shared terms. If a site upgrades from a version prior to 4.3
 straight to the latest version then it's not guaranteed that the
 `term_taxonomy` table contains unique `term_id` values, which is a
 prerequisite for combining the `terms` and `term_taxonomy` tables.

 To unblock this we need to ensure no shared terms are present. The upgrade
 routine should prevent the upgrade from continuing if shared terms might
 be present, and show a message explaining that the site must be updated to
 an interim version in order to first ensure any shared terms are split.
 This will ''only'' affect WordPress sites running a version prior to 4.3
 and attempting to update to the latest version.

 With this protection in place, all shared term handling can be removed and
 #30262 can proceed.

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


More information about the wp-trac mailing list