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

  1. bigdawggi
    Posted 2 years 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.


  2. matrlx
    Posted 2 years 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic