• Hi,
    Autoptimize functionality to aggregate JS-files reduces my load time dramatically, but it breaks the functionality of woocommerce products images.
    Aggregating JS-Files will stop showing product images in my shop. I could narrow it down to the ACF Plugin. When disabling it all seems to work fine. So it seems to me that I have to add the ACF plugin to be excluded from aggregating. Unfortunately I do not really nknow how to do so. Can someone give me a hint please?

Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    try adding plugins/advanced-custom-fields/ to the comma-separated JS optimization exclusion field maybe? and you’ll probably have to make sure “also aggregate inline JS” if off.

    hope this helps,
    frank

    Thread Starter sautaroc

    (@sautaroc)

    Thanks for your reply, but unfortunately this did not resolve the problem.
    these are the errors on the console:

    Uncaught ReferenceError: ECS_update_admin_bar_menu is not defined
        at (index):47
    (index):2189 Uncaught ReferenceError: acf is not defined
        at (index):2189
    (index):2189 Uncaught ReferenceError: acf is not defined
        at (index):2189
    autoptimize_6847b210e2525d82e2d413061d63a296.js:85 Uncaught TypeError: Cannot read property 'autop' of undefined
        at acf.Model.onReady (autoptimize_6847b210e2525d82e2d413061d63a296.js:85)
        at u (autoptimize_6847b210e2525d82e2d413061d63a296.js:82)
        at Object.n (autoptimize_6847b210e2525d82e2d413061d63a296.js:82)
        at Object.n.doAction (autoptimize_6847b210e2525d82e2d413061d63a296.js:82)
        at HTMLDocument.<anonymous> (autoptimize_6847b210e2525d82e2d413061d63a296.js:82)
        at i (jquery.js?ver=1.12.4-wp:2)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
        at Function.ready (jquery.js?ver=1.12.4-wp:2)
        at HTMLDocument.J (jquery.js?ver=1.12.4-wp:2)

    this is the console errors when aggregating js-files is of:

    color-picker.min.js?ver=5.5:2 Uncaught TypeError: Cannot read property '__' of undefined
        at color-picker.min.js?ver=5.5:2
        at color-picker.min.js?ver=5.5:2
    (anonymous) @ color-picker.min.js?ver=5.5:2
    (anonymous) @ color-picker.min.js?ver=5.5:2
    • This reply was modified 4 years, 6 months ago by sautaroc.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, this is the moment where I have to ask for your site’s URL so I can check the HTML source ??

    Thread Starter sautaroc

    (@sautaroc)

    here you go: https://www.dampfmatiker.de/produkt/voopoo-argus-gt-mod/

    (aggregating js is off now.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, can you also exclude plugins/advanced-custom-fields-pro?

    Thread Starter sautaroc

    (@sautaroc)

    I have excluded now the following:

    wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js, plugins/advanced-custom-fields/, plugins/advanced-custom-fields-pro/

    error log is:

    Uncaught TypeError: Cannot read property 'timepicker' of undefined
        at jquery-ui-timepicker-addon.min.js?ver=1.6.1:1
        at jquery-ui-timepicker-addon.min.js?ver=1.6.1:1
        at jquery-ui-timepicker-addon.min.js?ver=1.6.1:1
    (index):47 Uncaught ReferenceError: ECS_update_admin_bar_menu is not defined
        at (index):47
    acf-input.min.js?ver=5.9.0:3 Uncaught TypeError: Cannot read property 'autop' of undefined
        at acf.Model.onReady (acf-input.min.js?ver=5.9.0:3)
        at u (acf.min.js?ver=5.9.0:1)
        at Object.n (acf.min.js?ver=5.9.0:1)
        at Object.n.doAction (acf.min.js?ver=5.9.0:1)
        at HTMLDocument.<anonymous> (acf.min.js?ver=5.9.0:1)
        at i (jquery.js?ver=1.12.4-wp:2)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
        at Function.ready (jquery.js?ver=1.12.4-wp:2)
        at HTMLDocument.J (jquery.js?ver=1.12.4-wp:2)
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Do you have “force JS in head” active? If so, can you disable?

    Thread Starter sautaroc

    (@sautaroc)

    no, it’s not enabled.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    and “also aggregate inline JS”?

    Thread Starter sautaroc

    (@sautaroc)

    same for that. it’s disabled.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm … mystery …

    can you try also excluding either;
    * wp-content/themes
    * OR wp-content/plugins
    * OR wp-includes/js

    Thread Starter sautaroc

    (@sautaroc)

    very strange, none of it works. I did themes, plugins and js one after the other, the problem remains. The moment I disable aggregating js, everything is fine.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that is very strange indeed. you don’t have anything adding async/ defer to the (excluded) Javascript do you?

    Thread Starter sautaroc

    (@sautaroc)

    no, all empty.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Very weird sautaroc, I’m afraid the only advice I have at this point is to keep “aggregate JS” off and as an alternative experiment with asyncing the JS to make sure it is not render-blocking?

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘problem aggregating js-files’ is closed to new replies.