• Resolved Fox Lee

    (@fox-lee)


    Hi there,

    I’m running W3TC and Autoptimize together, as I love your caching features but AO is a bit better for me when it comes to minification. Lately I’ve run into an issue where W3TC is preventing some features of AO from working correctly. Specifically, it seems to be due to classes used for HTML minification (details in this thread).

    I’m raising it with you because this comes up even when I have minification completely turned off in W3TC, which seemed a bit weird. Is this working as intended? If so, could it be changed to prevent this kind of conflict when W3TC isn’t being used for minification?

    Thanks for your time!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Please update the plugin to the latest 0.9.7.4 version.
    If the issue persists, try adding the following In wp-content/plugins/w3-total-cache/lib/Minify/Minify/HTML.php replacing lines 346 and 347 with
    $m[2] = preg_replace( '/([a-z0-9]=)\'([^"\'\\s=]+[^"\'\\s=\\/])\'(\\s(?!\\/)|>)/i', '$1$2$3', $m[2] );

    $m[2] = preg_replace( '/([a-z0-9]=)"([^"\'\\s=]+[^"\'\\s=\\/])"(\\s(?!\\/)|>)/i', '$1$2$3', $m[2] );

    Hey Marko;
    Frank from Autoptimize here. The root cause seems that W3TC is loading its HTML minify class (and probably others) even if HTML minify is not active, could that be changed? That way there is no risk of interference of W3TC’s classes with AO (as in that case the AO classes will be autoloaded)?

    frank

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello Frank,

    I spoke with the team, and we’ve added an issue to auto-load minify library only when minify is on.
    This should be fixed in a future release.

    That’s great news Marko, thanks for looking into this! 👍

    Thread Starter Fox Lee

    (@fox-lee)

    Sorry for the late response, thank you to both of you for your help with this 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Interference with Autoptimize minification’ is closed to new replies.