Title: Plugin breaks some scripts
Last modified: December 12, 2021

---

# Plugin breaks some scripts

 *  Resolved [Evgenii Savelev](https://wordpress.org/support/users/evnomad/)
 * (@evnomad)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/plugin-breaks-some-scripts/)
 * Hello,
 * After pressing “Accept all” some things stop working (after 2 seconds):
    1. Search
   button on the sticked to the right bar. 2. Menu humburger on mobile.
 * I noticed that it gets fixed if I comment “dispatch” stroke in file complianz-
   gdpr/assets/js/complianz.js
 *     ```
       function cmplzRunAfterAllScripts() {
          console.log('cmplzRunAfterAllScripts');
          if (!cmplzAllScriptsHookFired && cmplzArrayIsEmpty(waitingInlineScripts) && cmplzArrayIsEmpty(waitingScripts) ) {
             var event = new CustomEvent( 'cmplzRunAfterAllScripts' );
       //      document.dispatchEvent(event);
             cmplzAllScriptsHookFired = true;
          }
       }
       ```
   
 * It seems like some js code evaluates twice after accepting cookies.
 * Any ideas how I can fix this?
 * Thank you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-breaks-some-scripts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * (@jarnovos)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/plugin-breaks-some-scripts/#post-15157601)
 * Hi [@evnomad](https://wordpress.org/support/users/evnomad/),
 * I noticed that you had disabled Complianz on this site, so I couldn’t see the
   behavior in action. I expect that it might’ve been related to the plugin blocking
   certain JavaScript related to these elements.
 * If you re-enable the plugin, I’d be glad to have a closer look at this.
 * Just let me know if that would be desired.
    Kind regards, Jarno

Viewing 1 replies (of 1 total)

The topic ‘Plugin breaks some scripts’ is closed to new replies.

 * ![](https://ps.w.org/complianz-gdpr/assets/icon-256x256.png?rev=2881064)
 * [Complianz - GDPR/CCPA Cookie Consent](https://wordpress.org/plugins/complianz-gdpr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/complianz-gdpr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/complianz-gdpr/)
 * [Active Topics](https://wordpress.org/support/plugin/complianz-gdpr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/complianz-gdpr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/complianz-gdpr/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/plugin-breaks-some-scripts/#post-15157601)
 * Status: resolved