[wp-trac] [WordPress Trac] #42572: Can't delete custom taxonomy tags from a post
WordPress Trac
noreply at wordpress.org
Thu Nov 16 07:17:41 UTC 2017
#42572: Can't delete custom taxonomy tags from a post
--------------------------+-----------------------------
Reporter: thrica | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.9
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Symptoms are the same as #39388: I can add terms in my custom taxonomy to
a post, but I can't remove them. I'm not using any of the filters
mentioned in that ticket. Based on logging all SQL queries on saving a
post, it looks like removing a category triggers a query like:
{{{
DELETE FROM wp_term_relationships WHERE object_id = 1470 AND
term_taxonomy_id IN ('7')
}}}
No DELETE query at all is running when I try to remove the custom
taxonomy, so it's not a malformed query. Same problem whether I'm using
the classic editor, the quick editor, or Gutenberg.
As a further wrinkle, in the classic editor, my terms don't even show up
in the checkboxes in the sidebar (all of them are unchecked), though they
do show up on the front end, in the quick editor, and in Gutenberg.
This didn't always happen, but I don't recall the version it started with.
Disabling all plugins doesn't fix it, neither does clearing out my
functions.php entirely, and neither does changing 'hierarchical' to false.
My arguments for registering the taxonomy are as follows:
{{{
$args = [
'labels' => [ /* a bunch of strings */ ],
'public' => true,
'hierarchical' => true,
'show_in_rest' => true,
'rewrite' => ['hierarchical' => true],
'query_var' => 'idea'
];
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42572>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list