Title: Ninja forms conflict Autoptimize
Last modified: June 29, 2017

---

# Ninja forms conflict Autoptimize

 *  [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/)
 * Hello!
    Ninja forms are blocked when basic settings of Autoptimize are activated.
 * (seal.js, js/jquery/jquery.js is excluded by default)
 * Please help! Thank you!
 * P.S. I note previous thread on Ninja forms – Autoptimize, but it does nto help
   solve this issue…

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9273946)
 * afternoon [@awphelpt](https://wordpress.org/support/users/awphelpt/);
    the basic
   settings are just that really, basic settings. in case of problems you should
   have a look at the troubleshooting tips in [the FAQ](https://wordpress.org/plugins/autoptimize/faq)
   and change those settings.
 * specifically have a look at any JS error on the browser console and try excluding
   JS that is referenced by those errors. alternatively you could try excluding 
   the ninja forms JS.
 * if you have done so and are still not able to fix, then provide me the URL to
   your site and describe what troubleshooting-steps you took and I’ll try to help
   you based on that info.
 * hope this clarifies,
    frank
 *  Thread Starter [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274023)
 * Frank – Thank you for reply!
 * I have to qualify my problem: I run multisite install, and on primary domain 
   the ninja form works fine: [https://diagnosticdetectives.com/contact/](https://diagnosticdetectives.com/contact/)
 * On domain-mapped installs (and with identical Ninja form settings and Autoptimize
   settings, sites differ only in language) no forms are seen:
    [https://diagnosticdetectives.de/contact/](https://diagnosticdetectives.de/contact/)
   [https://diagnosticdetective.ru/contact/](https://diagnosticdetective.ru/contact/)
 * In FF web debug console I do not see any Ninja js or errors…
 * Thank you!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274348)
 * and have you tried excluding the ninja-forms JS from optimization?
 *  Thread Starter [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274386)
 * I just don’t see those ninja forms JS in web console. Also, for Primary site (
   which is, in my case, diagnosticdetectives.com) settings work fine, it is for
   domain-mapped sites that no forms show up…
 * Excluding what I see in ninja forms js folder in SFTP-accessed WP folders (e.
   g., all-forms.js) did not work, but there are 48 files in js folder in ninja 
   forms…
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274411)
 * well, you can exclude by folder-name, e.g. `plugins/your-plugin` or `your-plugin/
   js` …
 *  Thread Starter [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274428)
 * I tried excluding this, not sure if syntax is correct:
    /wp-content/plugins/ninja-
   forms and then this: /wp-content/plugins/ninja-forms/assets/js
 * Did not work… What I don’t get is why Primary site works OK with default settings…
   could there be a wrong syntax in default exclusions of “seal.js, js/jquery/jquery.
   js”? If so, what could be the right syntax? Maybe that’s where the solution lies…
 * Thank you!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274441)
 * > could there be a wrong syntax in default exclusions of “seal.js, js/jquery/
   > jquery.js”
 * no, the problem is probably that AO isn’t aggregating in the same manner for 
   the non-default sites. are you using WPML?
 *  Thread Starter [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274470)
 * no, no! There are no language plugins! Never! I run standard multisite install
   hosted by WP Engine. Primary site is in English. Other sites are “domain-mapped”,
   but each site is native and there is absolutely no connection between those sites!
   No posts are linked. No plugins! Those are bad (I tried them years ago…) So issue
   that sites are in different languages are just incidental… I can clone my primary
   site in English and I am sure issue will replicate…
    Thank you!
 *  Thread Starter [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274833)
 * The issue seems to be related to domain mapping: I cloned the main site to /test1/
   folder, so contact form is here: [https://diagnosticdetectives.com/test1/contact/](https://diagnosticdetectives.com/test1/contact/)
   
   In this configuration the form shows up with basic settings of the autoptimize
   plugin.
 * I am using WP Engine-recommended WordPress MU Domain Mapping plugin for domain
   mapping…
 * But on all domain-mapped sites the form disappears… Do you have any suggestions
   how I could fix that? Thank you!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274884)
 * so, in browser console I do see errors after all;
 * > 20:48:59.625 TypeError: t is undefined 1 front-end-deps.js:20:349
   >  20:49:00.802
   > ReferenceError: Marionette is not defined 1 front-end.js:1:8243
 * the problem is that on the non-default sites (e.g. diagnosticdetectives.de) some
   CSS/ JS files are on diagnosticdetectives.com and autoptimize doesn’t optimize
   CSS/JS on another domain.
 * you can tell AO that those domains should be treated the same with this code 
   snippet (quick example, untested!!);
 *     ```
       add_filter('autoptimize_filter_cssjs_multidomain','awphelpt_domains');
       function awphelpt_domains($in) {
           return array_merge($in, array("diagnosticdetectives.de","diagnosticdetectives.ru"));
       }
       ```
   
 *  Thread Starter [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274899)
 * Do I put this code in function.php or where? Willing to test the code, no probs!
   
   Thank you!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274958)
 * functions.php is a possibility, but [the code snippets plugin](https://wordpress.org/plugins/code-snippets)
   is clearner and safer alternative 🙂
 *  Thread Starter [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9274986)
 * Added code directly to active theme functions.php file, does not work, unfortunately(
   I did remove one letter “s” to correct for .ru url)… 🙁
 *  Thread Starter [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * (@awphelpt)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9275009)
 * Could I write to you via [http://autoptimize.com/](http://autoptimize.com/) ?
   I have taken enough of your time already! Thank you

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

The topic ‘Ninja forms conflict Autoptimize’ 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/)

## Tags

 * [ninja form](https://wordpress.org/support/topic-tag/ninja-form/)
 * [script blocking](https://wordpress.org/support/topic-tag/script-blocking/)

 * 14 replies
 * 2 participants
 * Last reply from: [awphelpt](https://wordpress.org/support/users/awphelpt/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/ninja-forms-conflict-autoptimize/#post-9275009)
 * Status: not resolved