-
Notifications
You must be signed in to change notification settings - Fork 0
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
Code review for 6.1.1 global stylesheet invalidation testing plugin #1
Conversation
Invalidation works with any "global_styles_<stylesheet>" name.
Makes `wp_get_global_stylesheet()` rebuild global styles.
LGTM, good job! |
Prevents transient invalidation from running more than once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this PR.
I installed this plugin, and updated WP 5.9.5 to 6.1.1 using the update button in the admin area.
The issue is that the wp_test_56970_transient_global_styles_stylesheet()
callback function doesn't get called during the upgrade process (or later).
Are there any steps/prerequisites to make this work?
Thanks, @anton-vlasenko -- yes, the steps to test can be found here. The global stylesheet transient is loaded on the frontend or in the editor, so the hook should only fire the first time either of those are loaded. Caching must not be disabled (e.g. |
Thanks, @ironprogrammer. |
Creates a testing plugin to address issue described in Trac 56970.
Why a testing plugin?
Because the issue occurs after upgrade from WordPress 5.9/6.0 to 6.1.1 specifically, is hard to reproduce. Making a plugin available to the community allows for easier testing to validate whether this approach is works. If this plugin is found to address the reported issue, then the implementation may be adapted in an upcoming minor release.
Details
transient_$transient_name
filter to invalidate the cache for `'global_styles_'.Note that this is a different approach from that proposed in wp-hotfix-56970/pull/1. While the other plugin does resolve the issue in local controlled testing, it also introduces caching changes from Gutenberg to Core that should ideally ship with the next major after the code has had more time to bake in Gutenberg. 43%.
Testing
Tested with 5.9 and 6.0, and addresses issue described per the testing instructions.
More testing is needed by the community in different hosting environments, to determine whether it works when external caching is at play.