Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19291

bigdawggi on "[Plugin: W3 Total Cache] CSS/JS Minify Path Error with Non-Standard wp-content directory HAS PATCH"

$
0
0

I had an error in the admin come up - much like this thread, but not the same issue.

Recently an error occurred while creating the CSS / JS minify cache: File "/var/www/vhosts/example.com/html/wp/wp-content/mu-plugins/interest-survey/lib/js/script.js" doesn't exist." doesn't exist.

That message is accurate, but not correct. The file doesn't exist at the path, but the compiled path used is incorrect.

Our webroot is set up like this:
{webroot}/wp == WordPress directory
{webroot}/wp-content == Custom wp-content directory

The issue arrises that the Minify code is looking for the WordPress site directory in the wp-content path, but without a trailing slash on the site directory. Meaning that it's getting a false-positive with the directory structure above because the wp-content directory begins with "/wp".

The patch, found here, uses trailingslashit() to make sure it's looking for the site directory, and not just a match by happenstance with the WP_CONTENT_DIR.

It's working well for us now.

http://wordpress.org/plugins/w3-total-cache/


Viewing all articles
Browse latest Browse all 19291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>