-
Notifications
You must be signed in to change notification settings - Fork 216
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
The /feed/ url is cached and optimized by default #5599
Comments
related commit c0fb3c9 in 3.12.3.2 |
the user_trailingslashit() should only be applied to user added patterns, instead of applying it in the get_rocket_cache_reject_uri(), to avoid adding extra slash to some of the patterns. This could be done by using this function before saving the value to the database with the pre_update hook for example, or during sanitize of the option |
Related: https://secure.helpscout.net/conversation/2083011318/385873?folderId=3864740
|
We will need to take out these lines: wp-rocket/inc/functions/options.php Lines 238 to 243 in 2f768f9
Match only user added patterns to permalink structureWhen settings is saved When Permalink structure changes We also need to update the cache_reject_uris that uses the new permalink structure to reflect in the UI , to do that we will edit this method
rocket_generate_config_file() function.
|
I think we need to make it simpler, I believe the first point is not needed, using the hook
what do u think? |
Reproduce the problem ✅Scope a solution ✅Regarding @engahmeds3ed comment above and discussion with @Tabrisrp to address the UI, We will need to take out these lines: wp-rocket/inc/functions/options.php Lines 238 to 243 in 2f768f9
WP_Rocket\Engine\Cache\Config:: ConfigSubscriber and add a new call back that will hook to get_rocket_option_cache_reject_uri that way, non user added pattern will be preserved and changes will reflect in the UI also.
Estimate the effort ✅[XS] |
This solution won't be reflecting the correct value in the DB when a value was first added then saved. That's why it needs to happen before saving the value, not later |
After a discussion with @Tabrisrp we agreed on that using So in the same class
then
what do u think @jeawhanlee ? |
https://secure.helpscout.net/conversation/2085793083/386604?folderId=377611 |
…2.3.2 (#5604) * Remove user_trailingslashit wrapper * Update to match with permalink structure * Updated test fixture * Updated class * Added tests * use pre_update_option filter to modify pattern before saving * Update tests * Updated tests * Updated unit test * fixed tests * Update inc/Engine/Cache/Config/ConfigSubscriber.php * Use options api and data classes * Updated unit test * Update to accept trailing slash per line with permalinks having none * Updated tests * Updated to exclude patterns with index.php from respecting permalink structure * Updated tests * Update inc/Engine/Cache/Config/ConfigSubscriber.php * Update inc/Engine/Cache/Config/ConfigSubscriber.php * phpcs fix * make fixture readable * Updated fixtures Co-authored-by: Rémy Perona <remy@wp-rocket.me> Co-authored-by: Ahmed Saed <eng.ahmeds3ed@gmail.com>
…2.3.2 (#5604) * Remove user_trailingslashit wrapper * Update to match with permalink structure * Updated test fixture * Updated class * Added tests * use pre_update_option filter to modify pattern before saving * Update tests * Updated tests * Updated unit test * fixed tests * Update inc/Engine/Cache/Config/ConfigSubscriber.php * Use options api and data classes * Updated unit test * Update to accept trailing slash per line with permalinks having none * Updated tests * Updated to exclude patterns with index.php from respecting permalink structure * Updated tests * Update inc/Engine/Cache/Config/ConfigSubscriber.php * Update inc/Engine/Cache/Config/ConfigSubscriber.php * phpcs fix * make fixture readable * Updated fixtures Co-authored-by: Rémy Perona <remy@wp-rocket.me> Co-authored-by: Ahmed Saed <eng.ahmeds3ed@gmail.com>
/wp.serviceworker was also affected 3.12.3.3 fixes the issue. |
Before submitting an issue please check that you’ve completed the following steps:
yes- Made sure you’re on the latest version
yes - Used the search feature to ensure that the bug hasn’t been reported before
Describe the bug
On WP Rocket 3.12.3.2
/feed/
is cached and optimized by default. rolling back to 3.11.5 fixes the issue.this might be affecting
/wp-json/
too and probably other paths. (untested)To Reproduce
Steps to reproduce the behavior:
Expected behavior
Feeds should not be cached unless the user opts for this. And optimizations shouldn't be applied in any case.
Screenshots
https://i.imgur.com/IM3zjAV.jpg
Additional context
ticket where /feed/ is cached https://secure.helpscout.net/conversation/2079965213/385018/
probably related, about /wp-json/: https://secure.helpscout.net/conversation/2082507658/385784?folderId=273761
Backlog Grooming (for WP Media dev team use only)
The text was updated successfully, but these errors were encountered: