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

Style variation cache not cleared with WP_DEVELOPMENT_MODE set to theme #60399

Open
mikemcalister opened this issue Apr 3, 2024 · 2 comments
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@mikemcalister
Copy link

Description

When developing a theme, it is handy to have define( 'WP_DEVELOPMENT_MODE', 'theme' ); defined so your theme.json styles don't get cached. While this works for theme.json, it doesn't seem to clear the cache for style variations in the /styles folder.

The only way I can get the cache to clear is by going to Editor → Styles and clicking another style and clicking back. Ideally using the theme development mode should clear all .json caches.

Step-by-step reproduction instructions

  1. Add a style variation in the /styles folder.
  2. Add a button and set the color to an accent color.
  3. In your style variation, override the accent color with something like #000 and save.
  4. Visit the browser and refresh the page.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.5

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

@mikemcalister mikemcalister added the [Type] Bug An existing feature does not function as intended label Apr 3, 2024
@ramonjd ramonjd added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Apr 3, 2024
@colorful-tones
Copy link
Member

Curious, does define( 'SCRIPT_DEBUG', true ); work?

@mikachan
Copy link
Member

mikachan commented May 2, 2024

Some related issues with further discussion: #43395 & #46397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants