Skip to content
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

Clear theme.json cache after saving Styles in FSE #40048

Closed
SergeGusev opened this issue Apr 5, 2022 · 6 comments
Closed

Clear theme.json cache after saving Styles in FSE #40048

SergeGusev opened this issue Apr 5, 2022 · 6 comments
Labels
[Feature] Saving Related to saving functionality Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement. [Type] Performance Related to performance efforts

Comments

@SergeGusev
Copy link

What problem does this address?

It is taking too long (for development) waiting for site's style changes after setting background color, for example. This is a video - https://drive.google.com/file/d/1h1Nn71QtCviAdPoruufSkC1rmKck_pON/view

What is your proposed solution?

You can clear all caching after pressing Save button on Styles tab (well, on whole page too, I thinks)

@annezazu annezazu changed the title I'd suggest to clear theme.json cache after saving Styles in FSE Clear theme.json cache after saving Styles in FSE Apr 6, 2022
@annezazu annezazu added [Type] Enhancement A suggestion for improvement. [Type] Performance Related to performance efforts [Feature] Saving Related to saving functionality Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Apr 6, 2022
@bradhogan
Copy link

+1 on this. Frustrating that multiple hard refreshes don't show global style updates in some cases. Not a great UX when the idea is to make things instantly visually in the editor but not on the actual site.

@nick6352683
Copy link

Same problem here... This should have a priority for WP 6.0 !

@mrleemon
Copy link
Contributor

This is a pain in the neck. The theme,json cache should be refreshed when a change in the file is made.

@kauaicreative
Copy link

kauaicreative commented Nov 13, 2022

define( 'SCRIPT_DEBUG', true ); or define( 'WP_DEBUG', true ); in wp-config.php should fix the issue with theme.json
But I find styles unusable e.g. /styles/theme.json unusable. The cache never clears on my local environment.

@nick6352683
Copy link

Thanks I'll give it a shot - although it will be in a localhost Xampp php 7.4 environment.

@oandregal
Copy link
Member

oandregal commented Nov 18, 2022

Closing as duplicate of #43914

It's been fixed at #45679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Saving Related to saving functionality Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement. [Type] Performance Related to performance efforts
Projects
None yet
Development

No branches or pull requests

7 participants