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

WordPress Trac noreply at wordpress.org
Fri Jun 14 09:27:36 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 enps5):

 I made a script that allows to detect and delete duplicate taxonomies.
 We choose to delete the post_tag but you can adapt the behavior.
 I think this script can help some people who follow the ticket to identify
 taxonomies in their databases, the script produces a csv file like.

 {{{
 #!/bin/bash
 for site in $(wp site list --field=url) ; do
  for tagID in $(wp --allow-root term list category post_tag link_category
 post_format --format=csv --fields=term_id --url=${site}|sort -h |uniq
 -di); do
    mail=$(wp --allow-root user list --role=administrator --url=${site}
 --field=user_email --format=csv | tr "\n" ",")
    echo "Url; ${site} | tagID; ${tagID} | mail; ${mail}"
    echo "tagID:${tagID}"
    echo "Maybe should we execute: \"wp --allow-root term delete post_tag
 ${tagID} --url=${site}\""
  done
 done
 }}}

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


More information about the wp-trac mailing list