-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Block Style Variations CSS not loaded for non-admins #64755
Comments
Thanks for the detailed issue @kraftner 👍 I can replicate the issue. For others looking into this issue, here's some additional context:
I spent a while going in circles on how to achieve this for both the base (theme) global styles and the user-origin global styles. I'm sure others, who are more knowledgeable around the REST API and caps will have better ideas, but #64797 contains some hacks that sort of make global styles data accessible for non-admin users in the post editor. |
@aaronrobertshaw Thanks for your work on this. I was just wondering: Since this is a major regression introduced in 6.6, do you think this will make it into 6.6.2? I at least didn't see it on https://github.com/orgs/WordPress/projects/213/views/1 but would expect it to be there since this breaks major functionality. |
@kraftner It would be nice to get a fix in for 6.6.2 however it isn't clear yet what the best approach to ensuring access to global styles data in the post editor is for non-admins. Depending on the scope of required changes it might need more time for testing and to land in a possible 6.6.3. There are some explorations evolving in the exploratory PR I linked: #64797. That might be the best place to following along in the short term. In the meantime though, I'll add this issue to the "In Progress" column of the 6.6.X board. |
After some further discussion and exploration, a new potential fix is available in #65071. |
Description
The styles for block style variations are not visible in the editor for anyone without the
edit_theme_options
capability, so anyone but administrators.They are loaded in the frontend but not in the backend.
Looking at the browser console one can see errors wit the REST API, but only in WP 6.6.1 without Gutenberg. With Gutenberg I don't see those errors, but the behavior and display of the blocks in the editor still has the same bug.
Step-by-step reproduction instructions
edit_theme_options
, e.g.editor
.core/button
.Screenshots, screen recording, code snippet
Bildschirmaufzeichnung.vom.2024-08-23.17.49.21.webm
REST API errors in WP 6.6.1 without Gutenberg
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: