Warning: bug in W3 Total Cache impacts Autoptimize

Update 4th Feb: the HTML minify bug was fixed in W3TC v. 0.9.7.2, released a couple of days ago.

Update 19th Feb: I’m still seeing issues caused by W3TC, seems like not all is fixed fully yet.


Quick heads-up for users that have both W3 Total Cache and Autoptimize installed; the latest W3TC update (version 0.9.7.1) introduces a nasty bug in the HTML minifier which also impacts Autoptimize as that uses the same minifier class (Minify_HTML, part of Mr. Clay’s Minify). When W3TC is running the Minify_HTML class is loaded by and from W3TC, meaning AO’s autoload does not have to load the Minify_HTML from AO proper (which does not have that problem).

The bug sees some characters, esp. quotes disappear from the HTML leading to all sorts of .. weirdness from Pinterest icons not showing over mis-aligned titles in RevSlider to broken custom share buttons and more.

If you’re impacted by the bug, you can do one of the following;

  • disable HTML optimization in Autoptimize (and W3TC)
  • OR temporarily disable W3TC (or switch to another page cache plugins)
  • OR download and install the previous version of W3TC (0.9.7)

Fingers crossed they’ll release an update soon!

11 thoughts on “Warning: bug in W3 Total Cache impacts Autoptimize

  1. Brian

    I saw this bug, and experienced it. I turned off HTML optimization.
    one question though, I thought that you would only want one of the products to do minification… so rather than having HTML optimization on in W3TC and Autoptimize, wouldn’t it be better to run it ONLY from Autoptimize?

    Reply
    1. frank Post author

      absolutely, but as both W3TC & AO use the HTML_Minify class, given the wonders of autoload the component is loaded only once and it happens to be the buggy W3TC one that “wins” that race :)

      Reply
  2. steve

    Thanks for the heads up, explains why my Facebook review plugin stopped displaying the profile pictures of reviewers.

    Reply
  3. Mary Ann

    Any update on this for March? I still have minify html turned off and would like to turn it back on.

    Reply
    1. frank Post author

      I have no idea to be honest Mary Ann, I don’t use W3TC myself and don’t follow up on their releases closely. Maybe give it a try and test if everything works as it should?

      Reply
    1. frank Post author

      W3TC still loads their HTML minifier even when HTML minify is off in W3TC and that results in AO using W3TC’s version of the HTML minifier which can be overly enthusiastic in removing quotes around attribute values. The W3TC team has this (loading minifier even if the HTML min. option is not on) on their backlog, so it _should_ eventually get fixed.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.