-
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
Global Styles: unable to save block variations when KSES is active #53428
Comments
The kses filter at fault is
|
Here's a rough PoC which includes hooking |
@tellthemachines, @andrewserong 👋 looks like you initially worked on the variation style editor. This bug has been reported which shows that the variation styles are not saved on multisite installs. I've cobbled together a very rough patch which shows what roughly needs to be done. However I'm not familiar with this or the surrounding code (or theme.json really). Is this something you could take on? Or failing that guide me through? |
Thanks for reporting this @dsas ! That patch looks OK. Would you like to open a PR with it? |
+1 that looks like a good direction to me, too! Happy to help review once you've got a PR open 🙂 |
Description
The KSES filters prevent changing block variation styles via the Global Styles sidebar in the site editor.
These filters are only registered when a user doesn't have the unfiltered_html capability (which is the case for multisite regular admins).
When these filters are active, any change to the block variation property is reverted back to its previous value.
Looking at the HTTP request to the global-styles endpoint, the PUT request includes the block variation changes but the response doesn't.
Step-by-step reproduction instructions
add_action( 'init', 'kses_init_filters' );
Screenshots, screen recording, code snippet
Screen.Recording.2023-08-08.at.15.26.58.mov
Environment info
GB plugin trunk
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: