• Resolved Jason

    (@shaffnert03)


    I just installed Autoptimize and have been configuring and by and large love it!

    I noticed however that one widget I use, based on this plugin: https://www.ads-software.com/plugins/wp-tab-widget/, seems to not load.

    I began working through the instructions for excluding the plugin from js and css optimization and worked through a variety of settings only to discover that even turning off js and css optimization still left the plugin broken! Accordingly I tested turning off html optimization and it started working again! Furthermore, it continued to work if I then turned js and css optimizations back on without any non-default exclusions.

    So, weirdly, it seems it’s the html optimization that’s causing this plugin to fail to load, not the others. Unfortunately there’s not option to exclude a plugin from html optimization like there is with the others so for now I’ve just had to turn this feature off.

    Is this a bug? If so is there a fix coming? Is there a way to get html exclusion added like the others so I could turn it back on but exclude this plugin? Any help would be appreciated; thanks!

    • This topic was modified 4 years, 7 months ago by Jason.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    No idea why that would happen I’m afraid. Can you enable HTML opt and then
    1. check the browser console for errors?
    2. copy/paste the resulting HTML and put it up on pastebin.com or a github gist for me to review?

    Thread Starter Jason

    (@shaffnert03)

    Browser console definitely has errors; the warnings below are there even when the site works fine but enabling html optimization adds all the errors in the below. Pastebin of html at https://pastebin.com/6ppEmEX6.

    
    DevTools failed to parse SourceMap: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.preload.js.map
    (index):72 Uncaught ReferenceError: jQuery is not defined
        at (index):72
    (index):84 Uncaught ReferenceError: jQuery is not defined
        at (index):84
    (anonymous)	@	(index):84
    (index):91 Asset CleanUp: "LIVE MODE" (test mode is not enabled, thus, all the plugin changes are visible for everyone: you, the logged-in administrator and the regular visitors)
    notes-common-v2.js?ver=8.4.2-202017:158 Uncaught ReferenceError: jQuery is not defined
        at notes-common-v2.js?ver=8.4.2-202017:158
    admin-bar-v2.js?ver=8.4.2-202017:2 Uncaught ReferenceError: _ is not defined
        at admin-bar-v2.js?ver=8.4.2-202017:2
    autoptimize_8a97e797…eacee51b58d9a5.js:2 Uncaught ReferenceError: jQuery is not defined
        at autoptimize_8a97e797…eacee51b58d9a5.js:2
    admin-bar.min.js?ver=5.4:2 Uncaught TypeError: f.hoverintent is not a function
        at HTMLDocument.<anonymous> (admin-bar.min.js?ver=5.4:2)
    (index):1 A cookie associated with a cross-site resource at https://wordpress.com/ was set without the <code>SameSite</code> attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with <code>SameSite=None</code> and <code>Secure</code>. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
    (index):1 A cookie associated with a cross-site resource at https://wordpress.com/ was set without the <code>SameSite</code> attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with <code>SameSite=None</code> and <code>Secure</code>. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
    DevTools failed to parse SourceMap: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.postload.js.map
    ??-eJzTLy/QzcxLzilNS…xqZmZqXEWALkfL7E=:8 JQMIGRATE: Migrate is installed, version 1.4.1
    DevTools failed to parse SourceMap: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.preload.js.map
    (index):164 Uncaught ReferenceError: jQuery is not defined
        at (index):164
    DevTools failed to parse SourceMap: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.postload.js.map
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, so;
    1. something (not AO’s HTML minifier) is removing quotes. this could be the case if you’re using both W3 Total Cache & AO at the same time, in which case W3TC’s HTML minifier is “forced upon” AO (a known bug in W3TC
    2. jQuery is not defined means you will have to ensure jQuery is not optimized or asynced or deferred.
    3. you’re also using Asset Cleanup which offers optimization features as well, that might make things a tad more .. fragile as depending on configuration there might or might not be conflicts ??

    Thread Starter Jason

    (@shaffnert03)

    So, to make sure I’m understanding, it sounds likely to be the W3 Total Cache known bug that’s causing this issue? If this is a known bug, is there a known workaround?

    On 2 – will look into that.

    on 3 – The issue is there are page-specific unloads that I’m able to do in Asset Cleanup which Autoptimizer doesn’t seem to enable. I’ve turned off all other settings in Asset Cleanup though so that shouldn’t be an issue; I’m basically only using it for page-specific unloads.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    re W3TC; only 2 solutions i.e. disabling HTML opt. or swapping W3TC for another page cache plugin (I favor KeyCDN Cache Enabler or WP Super Cache).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘html optimization breaks widget plugin’ is closed to new replies.