Support » Plugin: W3 Total Cache » [Plugin: W3 Total Cache] *Important* parsing found with automatic minify

  • I thought I would let you know that I found a javascript parsing error when automatic minify was selected. In one of the files that was generated from my particular set of .js, I saw that the following code was broken because at some point it turned into a comment (/*) because of the syntax. Here’s what I mean:

    return target;},ajaxSettings:{url:ajaxLocation,isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"}

    At the ending part “*/*” (and onwards past the characters /*) it turned into a comment all the way to the end of the code, resulting in breaking the first part too because it never completed without having a closing tag or statement.

    I’ve already seen peoples’ comments about turning automatic minify off, which is a shame since that helps reduce load automatically, but maybe you could include a little bug fix in the future where any occurrence of */* or /* could be replaced by the html entity for the forward slash character (ampersand hash 47 semicolon).

    Thanks for such an amazing plugin otherwise!

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Headline typed wrong! Meant to write:
    *Important* parsing error found with automatic minify

    Hi,

    I think you forgot to tell where? in what file and line.

    No, I didn’t forget to tell where in the code it occurred because it will be different for each person. Mine is just a sample. It all depends on what javascript and CSS you have on your website. For me, it just happened to have shown up somewhere in the javascript of one of my forms plugins. So, when my particular .js was minified, it concatenated (ie, was joined with) the next piece of code and then was parsed as a “comment”, like this: /* THIS IS A COMMENT */
    Then all the code after that point broke – and probably some before that point, too!

    Just open up your minified .js file(s) and search for */* or /*, or even just look at it in a good text program (not Notepad or TextEdit – those are too simple) that displays code syntax. I love Coda which shows every way possible of displaying color-coded code. Without it i would be lost 🙂 Good luck.

    Hi,

    Is wired, If I turn on the minify works in chrome and firefox but not in IE. In IE some js dont work.

    Plugin Author Frederick Townes

    (@fredericktownes)

    This is a known issue with the minifier library that W3TC (and others use), what were your settings?

    the problem starts when I trun on this settings:

    JS minify settings:
    Enable
    Preserved comment removal (not applied when combine only is active)
    Line break removal (not safe, not applied when combine only is active)

    CSS minify settings:
    Enable
    Preserved comment removal (not applied when combine only is active)
    Line break removal (not applied when combine only is active)

    Also I just try:

    JS minify settings:
    Enable

    CSS minify settings:
    Enable

    and I have problems with fonts, cufon fonts

    Plugin Author Frederick Townes

    (@fredericktownes)

    Thanks, taking a look.

    Plugin Author Frederick Townes

    (@fredericktownes)

    I can’t duplicate this error, I believe it’s been fixed in the development version (not yet released).

    Hi,

    Ok will see, but did you test it with Internet explorer? because there is where the cufon fonts problem happens not in firefox.

    I am telling you so far I am using the plugin without a minify and help me a lot but I wish I can make it all work will rock.

    Plugin Author Frederick Townes

    (@fredericktownes)

    Support for cufon is tricky, you will need to work with a developer to find the remedy for minifying and then let me know what you learn.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: W3 Total Cache] *Important* parsing found with automatic minify’ is closed to new replies.