Title: Javascript error
Last modified: August 5, 2022

---

# Javascript error

 *  Resolved [simkog](https://wordpress.org/support/users/simkog/)
 * (@simkog)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-217/)
 * Dear plugin developer,
 * Something happened, and I cannot open my website. I cannot click on any element
   within the age gate popup. I had to disable the plugin.
 * There is only an error in the Javascript console:
 *     ```
       Uncaught RangeError: Maximum call stack size exceeded.
           at e (age-gate-public.js?ver=2.21.0:5:3023)
           at HTMLDocument.C (age-gate-public.js?ver=2.21.0:5:3500)
           at e (cmp2ui-en.js:2:105586)
           at HTMLDocument.m (cmp2ui-en.js:2:106158)
           at e (age-gate-public.js?ver=2.21.0:5:3023)
           at HTMLDocument.C (age-gate-public.js?ver=2.21.0:5:3500)
           at e (cmp2ui-en.js:2:105586)
           at HTMLDocument.m (cmp2ui-en.js:2:106158)
           at e (age-gate-public.js?ver=2.21.0:5:3023)
           at HTMLDocument.C (age-gate-public.js?ver=2.21.0:5:3500)
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-error-217%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-217/#post-15892555)
 * Hi [@simkog](https://wordpress.org/support/users/simkog/),
 * I think what’s happening here is Age Gate is trying to do a focus trap (i.e preventing
   interaction with anything else until they confirm their age) but also `cmp2ui`
   looks like it also trying to do the same thing.
 * In Age Gate -> Advanced Settings, try disabling the “Trap focus” option and see
   if that fixes it. Clear the site cache after if you have one.
 * If it doesn’t, keep it active and let me know so I can have a quick look.
 * Thanks
    Phil
 *  Thread Starter [simkog](https://wordpress.org/support/users/simkog/)
 * (@simkog)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-217/#post-15892568)
 * Dear [@philsbury](https://wordpress.org/support/users/philsbury/),
 * That was a fast answer, thanks for that! But, your suggestion did not resolved
   the problem.
 * I keep the plugin active, if you want to test it yourself.
 * Best regards,
    Gergo Simko
 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-217/#post-15892578)
 * Hi [@simkog](https://wordpress.org/support/users/simkog/),
 * I don’t get the error so I think one part is fixed.
 * It seems your cookie message is what is trapping focus, but that appears behind
   Age Gate, so you can’t clear the age gate in order to accept the cookies.
 * I’m going to see if I can see a work around, but might be worth looking in the
   settings for the cookie notice to see if there’s either a way to include other
   elements (which is what I do in age gate), or to disable the focus trap there.
 * Like I say, going to see if there’s a way to show the cookies on top with some
   css of something.
 * Will report back soon!
 * Thanks
    Phil
 *  Thread Starter [simkog](https://wordpress.org/support/users/simkog/)
 * (@simkog)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-217/#post-15892589)
 * Dear [@philsbury](https://wordpress.org/support/users/philsbury/),
 * Yeah, it was some CSS conflict from our theme developer.
 * The problem was, that we had a custom blur effect on everything (except the age
   gate popup) when the age gate is shown and the cookie popup could not load properly.
 * Thanks for your suggestion! I am going to close this support question!
 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-217/#post-15892594)
 * Ah amazing! Happy it’s working now [@simkog](https://wordpress.org/support/users/simkog/)!
 * Thanks
    Phil

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

The topic ‘Javascript error’ is closed to new replies.

 * ![](https://ps.w.org/age-gate/assets/icon-256x256.png?rev=2783003)
 * [Age Gate](https://wordpress.org/plugins/age-gate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/age-gate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/age-gate/)
 * [Active Topics](https://wordpress.org/support/plugin/age-gate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/age-gate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/age-gate/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Phil](https://wordpress.org/support/users/philsbury/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-217/#post-15892594)
 * Status: resolved