WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
W3 Total Cache not removing comments from JavaScript & CSS (5 posts)

  1. kylecfox
    Member
    Posted 1 year ago #

    When I enable minification of JS and CSS, W3 Total Cache inserts line-number comments!

    I've tried JSMin, YUI Compressor, and Closure Compiler -- they all yield the same result. Here's an example from the combined CSS file (/wp-content/w3tc/min/48c331e6.83ab9a.css)

    /* 14   */ html, body, div, span, applet, object, iframe,
    /* 15   */ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    /* 16   */ a, abbr, acronym, address, big, cite, code,
    /* 17   */ del, dfn, em, img, ins, kbd, q, s, samp,
    /* 18   */ small, strike, strong, sub, sup, tt, var,
    /* 19   */ b, u, i, center,
    /* 20   */ dl, dt, dd, ol, ul, li,
    /* 21   */ fieldset, form, label, legend,
    /* 22   */ table, caption, tbody, tfoot, thead, tr, th, td,
    /* 23   */ article, aside, canvas, details, embed,
    /* 24   */ figure, figcaption, footer, header, hgroup,
    /* 25   */ menu, nav, output, ruby, section, summary,
    /* 26   */ time, mark, audio, video {
    /* 27   */   margin: 0;
    /* 28   */   padding: 0;
    /* 29   */   border: 0;
    /* 30   */   font: inherit;
    /* 31   */   font-size: 100%;
    /* 32   */   vertical-align: baseline;
    /* 33   */ }

    The combined JavaScript file looks similar:

    /* jquery.cycle.js */
    
    /* 101  */
    /* 102  */ function triggerPause(cont, byHover, onPager) {
    /* 103  */     var opts = $(cont).data('cycle.opts');
    /* 104  */     var paused = !!cont.cyclePause;
    /* 105  */     if (paused && opts.paused)
    /* 106  */         opts.paused(cont, opts, byHover, onPager);
    /* 107  */     else if (!paused && opts.resumed)
    /* 108  */         opts.resumed(cont, opts, byHover, onPager);
    /* 109  */ }

    What's going on?

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

  2. You have error reporting turned on. Go to performance -> general and uncheck minify error reporting.

  3. kylecfox
    Member
    Posted 1 year ago #

    Thanks for the reply. I forgot to update this post with that info -- the W3TC author contacted me with the same response you gave.

    However, when I turn off error reporting the files don't combine at all. All I see is an message saying the files couldn't be minified, and that I should turn on error reporting :P

  4. Whenever you get that minified error it is because one of the files can not be found. Go to your minify settings page and click verify on each file to make sure it is not returning a 404.

    Also if you have the version query strings set in your minify settings make sure you update them to 3.4.2 if you recently updated to latest WordPress version.

  5. kylecfox
    Member
    Posted 1 year ago #

    Weird - I don't see "verify" or any files listed on either the Minify or General settings page.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic