Support » Plugin: W3 Total Cache » [Plugin: W3 Total Cache] JS minify prevents JS script from working?

  • Resolved iOutshine


    I have this calculator form on one of my posts that uses JS to function. It’s inserted into the post using a Custom Field.

    However, if I enable JS minify, this calculator no longer functions.

    I’m obviously doing something wrong here, but I’m not advanced enough with JS or W3 Total Cache to actually know WHAT it is I’m screwing up.

    Any ideas?


Viewing 13 replies - 1 through 13 (of 13 total)
  • Not to steal this thread, but I’m also having similar issues.
    I fixed all my original problems with SSL certificate error warnings by reverting back to standard http. YSlow told me I should stick all my javascript in the bottom of the page, and google and others seem to tend to agree with this statement saying it speeds up page load times.

    So in the Minify settings I went ahead and deleted a few old javascripts from plugins no longer installed. Then set all javascripts in “Blocking” “Embed before </body>”. Cleared the minify cache then page cache.

    A number of things stopped working from doing this. Jetpacks Share icons dissapeared. My Theme (Shiword) slideshow on the front page stopped working. Facebook Connect and Facebook activity widget. The connect stopped working altogether and started reloading reloading reloading. Pages wouldn’t stop loading, and if you tried to login via FB then it would auto log you out. The activity widget only displays on 50% of pages, and seems to be on random posts/pages.

    I tried putting all JS back into the header, but it didn’t solve the problem, then I put it in “Un-Blocking” header, but didn’t fix anything either.

    Would love an in depth tutorial/info on this plugin, because it seems simple things that should work end up having disastrous effects and screwing with a “Finished Website”. I say finished, because I heard this was bad to install if you haven’t finished messing with your theme, plugins etc.

    So I put it off for about 3 weeks until I was sure I was done.

    Ok i have never used this plugin BUT one thing i have noticed with some old versions of minify scripts on other projects is that depending on how the browser sniffing is set up in the js script of for instance your calculator , minify can break it for Internet explorer, (or all browsers but IE).
    One of the ways of testing for IE was to make specific line like this

    var stIsIE = /*@cc_on!@*/false;

    To IE this reads as true but to all other browsers it reads as false, However some minify scripts will process this to

    var stIsIE = false;
    so when IE reads it it is set to false, and the script will probably fail in IE.

    Have you checked with multiple browsers, eg firefox, Opera, safari and Chrome, and seen if the script works in those, if it does then it is probably something in the browser detection if not, see if you are getting js errors.

    Yup, tested it in IE, Firefox and Chrome. When JS minify is enabled, it doesn’t work in any browser. Disable it, and it works fine in all of them.

    It’s screwed in all browsers for me.

    Also getting this error: “Recently an error occurred while creating the CSS / JS minify cache: A group configuration for “include” was not set.”

    I recommend letting WP-Minify handle CSS/JS caching, and disabling it in W3TC.

    Same problem for me since last W3TC update. When JS minify is enabled, it makes all audio players not visible and gives error message stating wrong version of Flash and/or JavaScript needed to be enabled. This was verified by multiple people on multiple OS platforms on multiple browsers. This happened to everyone, even after reinstalling Flash & checking to make sure JS was running. I even changed Word Press audio players, using non-flash varieties, but still had issues where no one even could see the new player. Most frustrating.

    It was only when I totally disabled the W3 Total Cache plugin, I saw that everything was suddenly fine. Then I subsequently went through each option, enabling/disabling and nailed down the culprit which was to totally disable minify. I realize there are Advanced, HTML, JS, CSS options I can play with, but I am at a total loss where to begin. I will try out the suggestion of using WP-Minify to handle CSS/JS caching.

    Having the same problem with my Lightbox on WordPress. Disabling the JS minification fixes the issue but then my Google Page Speed ranking drops a full point.

    You can see at

    justex07, did this only happen after a recent update with W3TC?

    In my case it happened that way. I had used it for over a year with no problems with my other plugin.

    I just recently (in the last few days) switched to W3TC from WP Super Cache so I can’t answer that for certain. The WP-Minify plugin also had this problem however.

    I just installed this plugin yesterday for the first time. Now the slider in my WooThemes Sealight theme is not working. I turned off the General>Minify and the Minify>JS Minify Settings to see if this would fix anything but it is still not working. I also tried resaving each one of the slides to see if this would have any effect…it didn’t.

    Also, I have a message at the top of my screen that says, “It appears Page Cache URL rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.” What on earth is that about and how do I make it happy so it will go away?

    You can see it in action…er ummm…lack of action here:

    Plugin Author Frederick Townes


    Whenever you activate minify especially for JS and have any issue in auto mode or even manually you’ll need to go by hand (in the worst) case and choose which files are minified. There’s no magical way to make this work perfectly for every possible web site.. yet.



    Hi everybody! I had the same problem and I’ve been looking for a solution for a long time and here it is!

    I found this page and there says that I should choice Manual Minify on main page of plugin. Then to go on Minify page, enable JS minify, select current theme and down there to add every js file that my wp site uses. Not just js files that we created and attached, but ALL js files. There are many ways to find list of all these files, depends of which browser are you using.
    I did that but still my js was disabled. So I found in my FireFox in Firebug that I have error on my script and that was: “$ is not a function”
    So I found solutions to change ‘$’ into ‘jQuery’ in all files where I had this error.
    So it works now! From 36 requests to 27!
    I hope this will help you!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: W3 Total Cache] JS minify prevents JS script from working?’ is closed to new replies.