CSS/JS minification/combination not working on Kinsta when the site's URL contains a path #3111
Labels
3rd party compatibility
Issues related to 3rd party compatibility like theme, plugin or hosting
module: combine CSS
module: combine JS
module: minify CSS
module: minify JS
priority: medium
Issues which are important, but no one will go out of business.
severity: major
Feature is not working as expected and no work around available
type: bug
Indicates an unexpected problem or unintended behavior
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
The following was found on a multisite where the subsites were in subfolders. I haven't checked it, but the same should stand for WordPress subfolder installations.
On Kinsta, who do their own CDN rewriting, CSS/JavaScript combination fails when the site's URL contains a path, e.g.
https://www.example.com/path/
.The following check is failing:
wp-rocket/inc/functions/formatting.php
Line 512 in 8f7f67b
This is because in the following line:
wp-rocket/inc/Engine/CDN/Subscriber.php
Line 238 in 8f7f67b
we are using only the
host
:Eventually the
$file
doesn't contain the root directory path here:wp-rocket/inc/functions/formatting.php
Line 497 in 8f7f67b
This returns
false
and assets aren't minified/combined.To Reproduce
Steps to reproduce the behavior:
Expected behavior
CSS/JavaScript combination should work regardless of the site's URL containing a path when using Kinsta or any host that does CDN rewriting.
Additional context
Related ticket: https://secure.helpscout.net/conversation/1272259848/191944?folderId=2135277
Backlog Grooming (for WP Media dev team use only)
The text was updated successfully, but these errors were encountered: