-
Notifications
You must be signed in to change notification settings - Fork 226
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
Don't define WP_ROCKET_CACHE_PATH if already set #6116
base: develop
Are you sure you want to change the base?
Don't define WP_ROCKET_CACHE_PATH if already set #6116
Conversation
Hello @tfgrass thanks for creating the PR. Any reason why not to use |
@piotrbak we are also setting WP_ROCKET_CACHE_ROOT_PATH
Problem is - in advanced-cache.php it tries to access WP_ROCKET_CACHE_PATH before the wp-rocket.php is executed, so we have to set it seperatly.
Maybe it would make sense to somehow include the wp-rocket.php so the constants are ready for use in advanced cache, but I'm not sure whether this would break something |
@tfgrass I might be missing something, but for me it doesn't make sense to define Lines 60 to 63 in 68b2aa2
If I'm missing something, please elaborate on this. We have many customers using Bedrock and that's the first request related to this constant. |
Also, |
@piotrbak just for my understanding - this is an old version of wp-rockets advanced-cache.php dropin? I just checked the backend, to see if it gives me this error https://docs.wp-rocket.me/article/134-advanced-cache-error-message - but in the backend I don't see any message like this. I will check if using the latest version of the drop in fixes the issue - this would be the right one, i guess?
|
Description
We are using WP Rocket with our Bedrock sites. One Problem we encountered, is that we have to set WP_ROCKET_CACHE_PATH early in our configurations, because else the constant is not ready when advanced-cache.php is executed.
Since we already defined WP_ROCKET_CACHE_PATH, we always get a Warning:
Constant WP_ROCKET_CACHE_PATH already defined
app/plugins/wp-rocket/wp-rocket.php:63
Type of change
Is the solution different from the one proposed during the grooming?
Please describe in this section if there is any change to the groomed solution, and why.
Checklists
Generic development checklist
Test summary
If not, detail what you could not test.
Please describe any additional tests you performed.