Title: Javascript exclude
Last modified: January 6, 2018

---

# Javascript exclude

 *  Resolved [mirco261](https://wordpress.org/support/users/mirco261/)
 * (@mirco261)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/javascript-exclude/)
 * Hello,
    your plugin is perfect, but when I enable aggregate JS, my plugin [https://codecanyon.net/item/fancy-product-designer-woocommercewordpress/6318393?s_phrase=&s_rank=6](https://codecanyon.net/item/fancy-product-designer-woocommercewordpress/6318393?s_phrase=&s_rank=6)
   doesn’t work. I tried exclude some *.js but it doesn’t help. Plugin use these.
   js: [http://nainternet.sk/wp-content/plugins/fancy-product-designer/assets/js/FancyProductDesigner-all.min.js](http://nainternet.sk/wp-content/plugins/fancy-product-designer/assets/js/FancyProductDesigner-all.min.js)
   [http://nainternet.sk/wp-content/plugins/fancy-product-designer/assets/js/fabric.min.js](http://nainternet.sk/wp-content/plugins/fancy-product-designer/assets/js/fabric.min.js)
   [http://nainternet.sk/wp-content/plugins/fancy-product-designer/assets/jssocials/jssocials.min.js](http://nainternet.sk/wp-content/plugins/fancy-product-designer/assets/jssocials/jssocials.min.js)
 * I tried to write these phrases:
    seal.js, js/jquery/jquery.js, wp-content/plugins/
   fancy-product-designer or seal.js, js/jquery/jquery.js, FancyProductDesigner-
   all.min.js, fabric.min.js, jssocials.min.js or seal.js, js/jquery/jquery.js, 
   min.js
 * and nothing help… How to write good exclude string? thank you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-exclude%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/javascript-exclude/#post-9840113)
 * your nextgen-gallery is messing the aggregation up somewhat, have a look at [AO’s FAQ](https://wordpress.org/plugins/autoptimize/faq)
   for info on how you can fix that. once that is done, re-try and have a look at
   the browser console for JS errors and feel free to report back here.
 * hope this helps,
    frank
 *  [andreashelbo](https://wordpress.org/support/users/andreashelbo/)
 * (@andreashelbo)
 * [8 years ago](https://wordpress.org/support/topic/javascript-exclude/#post-10289699)
 * Hi,
 * I’m very excited about your plugin too but I experience the same problem with
   the fancy product designer plugin.
 * The page is [https://dialaegt.dk/produkt/design-din-egen-dialaegt-plakat/](https://dialaegt.dk/produkt/design-din-egen-dialaegt-plakat/)
 * I’ve tried the phrases from micro261 above with no luck.
 * Is it possible to make a workaround? Thank you!
    -  This reply was modified 8 years ago by [andreashelbo](https://wordpress.org/support/users/andreashelbo/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years ago](https://wordpress.org/support/topic/javascript-exclude/#post-10289865)
 * > I experience the same problem with the fancy product designer plugin.
 * you seem to have removed `js/jquery/jquery.js` from the default JS exclusion 
   list Andreas and that causes multiple JS errors in the browser console. can you
   re-add the exclusion and see if that fixes the problem?
 * frank
 *  [andreashelbo](https://wordpress.org/support/users/andreashelbo/)
 * (@andreashelbo)
 * [8 years ago](https://wordpress.org/support/topic/javascript-exclude/#post-10290721)
 * Hi Frank,
 * Thanks for the quick reply!
 * I’ve added the JS exclusion but the plugin and I now get different errors in 
   the browser console:
 * Uncaught SyntaxError: Invalid regular expression flags
    (index):252 Uncaught 
   ReferenceError: FancyProductDesigner is not defined at HTMLDocument.<anonymous
   > ((index):252) at j (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.
   min.js:2) at Function.ready (jquery.min.js:2) at HTMLDocument.J (jquery.min.js:
   2) (anonymous) @ (index):252 j @ jquery.min.js:2 fireWith @ jquery.min.js:2 ready
   @ jquery.min.js:2 J @ jquery.min.js:2
 *  [andreashelbo](https://wordpress.org/support/users/andreashelbo/)
 * (@andreashelbo)
 * [8 years ago](https://wordpress.org/support/topic/javascript-exclude/#post-10290789)
 * I now added the 3 javascript that is used by the Fancy Product designer (now 
   js/jquery/jquery.js, FancyProductDesigner.js, fabric.js, plugins.js are excluded)
   and now it seems to work. However I still get some errors in the browser console.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years ago](https://wordpress.org/support/topic/javascript-exclude/#post-10290946)
 * most of those are warnings and (more importantly) also appear when AO is not 
   active (you can force-deactivate AO for a URL by appending it with `?ao_noptimize
   =1` );
 * ![](https://i0.wp.com/i.imgur.com/H2hOMoi.png?ssl=1)
 * So it looks like you fixed what need to be fixed 🙂
 *  [andreashelbo](https://wordpress.org/support/users/andreashelbo/)
 * (@andreashelbo)
 * [8 years ago](https://wordpress.org/support/topic/javascript-exclude/#post-10292541)
 * Thanks you – it was a big help! 😀

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

The topic ‘Javascript exclude’ 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/)

 * 7 replies
 * 3 participants
 * Last reply from: [andreashelbo](https://wordpress.org/support/users/andreashelbo/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/javascript-exclude/#post-10292541)
 * Status: resolved