[wp-trac] [WordPress Trac] #47535: Cannot edit a tag if it exists with same value as a category and vice versa + cannot publish post if an assigned tag exists with same value as a category and vice versa (context: multisite, table sitecategories, global_terms_enabled on)
WordPress Trac
noreply at wordpress.org
Thu Jun 13 14:01:31 UTC 2019
#47535: Cannot edit a tag if it exists with same value as a category and vice versa
+ cannot publish post if an assigned tag exists with same value as a
category and vice versa (context: multisite, table sitecategories,
global_terms_enabled on)
---------------------------+-----------------------------
Reporter: digitwebtools | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.1.1
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
Dear WordPress experts,
We are experiencing a weird behavior preventing to edit tags / categories
and publishing / updating posts. We believe it occurs when
''global_terms_enabled'' is ''on'' and some tags and categories share the
same value.
Our environment:
* WordPress Multisite 5.1.1 (actually, we've been using it and upgrading
it for years and years)
* Table ''sitecategories'' defined
* In table ''sitemeta'', ''global_terms_enabled'' is set to ''1''
Steps to reproduce:
* Create a new category "My category" THEN
* Create a new tag "My tag" THEN
* Create a new category with the same name of an existing tag, let's say
"My tag" THEN
* Create a new tag with the same name of an existing category, let's say
"My category"
Now it will break if you do the following:
* Edit the category "My tag" with the name of an existing tag, you'll get
"You need a higher level of permission. Sorry, you are not allowed to edit
this item."
* Edit the tag "My category" with the name of an existing category, you'll
get "You need a higher level of permission. Sorry, you are not allowed to
edit this item."
* Create / edit a content and assign the category "My tag" (with the name
of an existing tag) or assign the tag "My category" (with the name of an
existing category) and you'll get a 403 error with the response
{{{
{"code":"rest_cannot_assign_term","message":"Sorry, you are not allowed to
assign the provided terms.","data":{"status":403}}
}}}
May be related to https://core.trac.wordpress.org/ticket/46297
Thank you.
Best regards.
Alexandre - DIGIT WEBTOOLS
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47535>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list