-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taxonomy terms are gone in 4.2 rc-1 #11335
Comments
Hi @slimmilkduds, Thanks for the report. I wasn't able to reproduce this particular issue. First, I registered a custom taxonomy called
Next, I signed in as a user with the Can you share:
|
Tested and confirmed for the Categories panel (not custom) using both the author role and the contributor role. (33s)
In the Network panel in Developer Tools, I see a 403 error for a call to http://alittletestblog.com/wp-json/wp/v2/categories?per_page=100&orderby=name&order=asc&context=edit&_locale=user that looks like this: {"code":"rest_forbidden_context","message":"Sorry, you are not allowed to edit terms in this taxonomy.","data":{"status":403}}
In the Console panel, this error appears when on page load when I open a post for editing but I am not sure if it's related:
I tested using the contributor role on Firefox 63.0 on macOS 10.13.6 as well as the author role on Chrome 70.0.3538.77 on macOS 10.13.6. The alittletestblog.com site is hosted at WP Engine. Gutenberg 4.2.0-rc.1 was the only plugin active at the time of testing. |
I can confirm with Categories and Contributor. Looking further. |
The immediate problem is that this request URL has
The request URL should have |
I believe the problem originated with #10089, specifically the change to use |
Can the e2e tests be extended to run as multiple roles so we can catch these types of regressions? |
Yes. We could create a plugin that creates an @youknowriad Just so it's stated, I think reverting #10089 is the wrong approach for this. The data module will eventually need to handle You might disagree with the underlying
To revert #10089 instead of solving for cc @aduth |
As discussed in DM. I think the data module shouldn't have to think about context at all. It's not abstraction on the REST API, it's an abstraction to retrieve WordPress Data and the REST API is an implementation detail. We can't end up with entities in the store having different shapes depending on how they were fetched.
What bugs we will be reintroducing? #10089 is supposed to be a refactoring. If it fixes a bug by inadvertance, we can still fix in the old implementation of the component. |
Ok. Where should the distinction between
Maybe I misunderstood the implementation. I thought it was the path to eventually solving #10873 #7266 #7565 |
Why it must? |
As I mentioned before:
Is there an alternative implementation that you'd suggest? |
Yes, always return all the fields the user can access to in the |
I created this trac ticket to discuss it https://core.trac.wordpress.org/ticket/45252 |
Actually, it could be a new "special" context if we don't want to break backwards compatibility.
|
But then you'd have two different shapes of data in the store? Are you expecting that we'd change the implementation of |
No, because the shape won't change for the same user.
I'm not. I already talked about it a long time and I know It's not going to change now. I do think |
How do we refresh the component then? |
I don't know, a hook maybe (even if it's not my favorite option in term of extensibility). Why would you refresh it though? |
For #7565 even hacking with the Data Module seems like the wrong way to deal with those issues, it probably deserves its own component (Sidebar API or other). #7266 These kind of issues is exactly what the data module is supposed to fix but it also highlights something I was talking about, if we do sepparate |
Good point. |
I'll wait a little bit, it looks like an important discussion, so I'm fine waiting for other opinions on how to solve these issues. I can revert at anytime. |
Per |
I would just like to raise that I think the |
Describe the bug
For non admin users all taxonomies are now empty in the editor. It throws one (403) Forbidden error per taxonomy.
This is an issue with this specific version of GB, reverting back to 4.1.1 and everything is back to normal
To Reproduce
Steps to reproduce the behavior:
If these steps to reproduce doesn’t work I’ll add the console log tomorrow as I don’t have a computer available right now.
Desktop (please complete the following information):
Chrome
Additional context
GB 4.2 rc-1
The text was updated successfully, but these errors were encountered: