WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
CSS/JS Minify Path Error with Non-Standard wp-content directory HAS PATCH (2 posts)

  1. bigdawggi
    Member
    Posted 10 months ago #

    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/

  2. matrlx
    Member
    Posted 9 months ago #

    I have the same issue here. Yesterday my website got all blank. W3 total cache crashed combining the CSS files and I would have loose my entire database if I haven't done a backup.

Reply

You must log in to post.

About this Plugin

About this Topic