Title: problem aggregating js-files
Last modified: August 24, 2020

---

# problem aggregating js-files

 *  [sautaroc](https://wordpress.org/support/users/sautaroc/)
 * (@sautaroc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/)
 * 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)

1 [2](https://wordpress.org/support/topic/problem-aggregating-js-files/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-aggregating-js-files/page/2/?output_format=md)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13303905)
 * 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](https://wordpress.org/support/users/sautaroc/)
 * (@sautaroc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13303942)
 * 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 5 years, 9 months ago by [sautaroc](https://wordpress.org/support/users/sautaroc/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13303960)
 * 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](https://wordpress.org/support/users/sautaroc/)
 * (@sautaroc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13303990)
 * here you go: [https://www.dampfmatiker.de/produkt/voopoo-argus-gt-mod/](https://www.dampfmatiker.de/produkt/voopoo-argus-gt-mod/)
 * (aggregating js is off now.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304076)
 * OK, can you also exclude `plugins/advanced-custom-fields-pro`?
 *  Thread Starter [sautaroc](https://wordpress.org/support/users/sautaroc/)
 * (@sautaroc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304187)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304258)
 * Do you have “force JS in head” active? If so, can you disable?
 *  Thread Starter [sautaroc](https://wordpress.org/support/users/sautaroc/)
 * (@sautaroc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304406)
 * no, it’s not enabled.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304431)
 * and “also aggregate inline JS”?
 *  Thread Starter [sautaroc](https://wordpress.org/support/users/sautaroc/)
 * (@sautaroc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304604)
 * same for that. it’s disabled.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304618)
 * hmm … mystery …
 * can you try also excluding either;
    * `wp-content/themes` * OR `wp-content/plugins`*
   OR `wp-includes/js`
 *  Thread Starter [sautaroc](https://wordpress.org/support/users/sautaroc/)
 * (@sautaroc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304648)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304667)
 * that is very strange indeed. you don’t have anything adding async/ defer to the(
   excluded) Javascript do you?
 *  Thread Starter [sautaroc](https://wordpress.org/support/users/sautaroc/)
 * (@sautaroc)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13304686)
 * no, all empty.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/#post-13305776)
 * 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)

1 [2](https://wordpress.org/support/topic/problem-aggregating-js-files/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-aggregating-js-files/page/2/?output_format=md)

The topic ‘problem aggregating js-files’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 25 replies
 * 2 participants
 * Last reply from: [sautaroc](https://wordpress.org/support/users/sautaroc/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/problem-aggregating-js-files/page/2/#post-13429491)
 * Status: not resolved