[wp-trac] [WordPress Trac] #46297: Unable to edit specific terms : rest_cannot_assign_term OR 403

WordPress Trac noreply at wordpress.org
Fri Aug 23 16:33:37 UTC 2019


#46297: Unable to edit specific terms : rest_cannot_assign_term OR 403
--------------------------+------------------------------
 Reporter:  enps5         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  4.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by boonebgorges):

 @enps5 - it's been reported elsewhere by @digitwebtools that this issue
 may be linked to the use of global terms. Can you confirm whether you're
 using global terms on your network? Do you have a `wp_sitecategories`
 table with items in it?

 Based on the results of your SQL queries, some sites on your network
 contain "shared terms", which are terms in multiple taxonomies that share
 the same term ID. In WordPress 4.1, we stopped created shared terms, and
 subsequent releases we introduced some tools that should have triggered
 the "splitting" of these shared terms - the creation of a new entry in
 `wp_terms` where previously a single entry was shared between multiple
 `term_taxonomy_id`s. See
 https://developer.wordpress.org/plugins/taxonomies/split-terms-wp-4-2/ for
 some background.

 It appears that the split routines have not run on your installation. As a
 result, my hunch is that when you try to edit a term (an edit that happens
 via term_id), WordPress has insufficient information to decide which
 taxonomy you're referring to, and so it bails.

 Your best bet is to ensure that there are no more shared terms on your
 installation. Ensure that each site on your network has an up-to-date
 database schema. Then, run a script that re-saves each shared term (WP
 will handle the term-splitting logic) or use a plugin like
 https://github.com/jjeaton/wp-find-shared-terms, which contains a CLI
 command that could be easily scripted for a multisite network.

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


More information about the wp-trac mailing list