\r\n\r\n","answerCount":1,"datePublished":"2018-01-19T15:34:58+00:00","author":{"@type":"Person","name":"Nicholas","url":"https://toolset.com/forums/users/nicholasa-2/"},"acceptedAnswer":{"@type":"Answer","text":"We currently have no solution for this as this script was not meant to work with wordpress or wasn\\'t made wordpress compatible because even on a clean installation with non of our plugins the issue was still present where the script was generating errors in the console.\\n\\nThe alternative is to use the embedded form or a mailchimp form plugin to have your subscription form.","datePublished":"2018-02-13T17:57:55+00:00","upvoteCount":1,"url":"https://toolset.com/forums/topic/mailchimp-pop-up-form-script-is-breaking-view/","author":{"@type":"Organization","name":"Toolset","url":"https://toolset.com"}}}}}
We currently have no solution for this as this script was not meant to work with wordpress or wasn't made wordpress compatible because even on a clean installation with non of our plugins the issue was still present where the script was generating errors in the console.
The alternative is to use the embedded form or a mailchimp form plugin to have your subscription form.
This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
You can test this code in codepen.io. It works. The pop up will trigger if you try to exit the screen. It's an exit intent pop up. hidden link
And since you allowed yourself to install a plugin I think you can change the theme as well. I am sure you know how that works. Please go ahead and do it ?
Please check the console on the page I sent you where the popup is not showing. The code is interfering the toolset plugins.
I'm still working on this for you but I must apologize for the delay.
However might I ask if there is any alternative method for this form such as embedding it directly to the page itself instead of in a popup ?
In some more detail with the toolset plugins disabled there as still this error being displayed in the console
embed.js:6 GET <em><u>hidden link</u></em> 404 (Not Found)
p.getText @ embed.js:6
ra @ embed.js:23
b @ embed.js:2
(anonymous) @ embed.js:11
ka @ embed.js:20
oa @ embed.js:11
(anonymous) @ embed.js:24
b @ embed.js:2
Ya @ embed.js:24
e @ embed.js:22
(anonymous) @ embed.js:26
(index):464 Uncaught TypeError: Cannot read property 'setDefaults' of undefined
at HTMLDocument.<anonymous> ((index):464)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
at Function.ready (jquery.js?ver=1.12.4:2)
at HTMLDocument.K (jquery.js?ver=1.12.4:2)
Also it seems that jquery for the script isn't loading so i'm not sure what else to do since with the plugins disabled this is still the case. I've even tried it on a fresh wordpress install with non of our plugins installed and the result is still the same.
After some extensive testing, i've come to the conclusion that the popup form is not meant to be used in wordpress. They actually use the embedded forms for wordpress.
Sure its because its throwing a 404 when its importing the js script for the popup. So it needs to be modified in order to work. The embedded form was made to work universally and as mentioned you can create n embedded form and add it to the boxzilla plugin popup to get a similar effect.
I see this method does indeed provides a solution for the popup but as mentioned this script doesn't seem to be meant to work on wordpress hence why such a solution was provided.
Usually scripts are kept separate because each plugin loads its own dependencies and will cause conflicts if not loaded within their own containment.
This script is actually causing issues with our dependencies because its not written to be referenced only by the script instead if it loads before our scripts for views and layouts then this issue will occur.
Its not just limited to our plugins but I noticed that the same issue occurs with the script and the woocommerce plugin as well. I'm not sure what exactly we can do about this but the script has to be wordpress compatible.
This would need to be resolved on the side of mailchimp.