Hey all! We recently changed our domains and everything looks correctly configured in Marketo and with CNAME but we are now getting an error when submitting forms. Sometimes they submit, and sometimes we get the "Submission Failed, Please Try Again Later" message. It looks like a CORS issue with XML. Here is our error log:
"Access to XMLHttpRequest at 'https://discover.sago.com/index.php/leadCapture/save2' from origin 'https://discover.schlesingergroup.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."
Has anyone solved this previously?
Solved! Go to Solution.
... and as predicted and described in the blog post, you’re loading from 2 different LP domains:
Line 1014:
<script src="//discover.sago.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_1573"></form> <script>MktoForms2.loadForm("//discover.sago.com", "775-OMN-861", 1573);</script>
Line 1212:
<script src="//discover.schlesingergroup.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_1355"></form> <script>MktoForms2.loadForm("//discover.schlesingergroup.com", "775-OMN-861", 1355);</script>
Please link to a page that’s behaving like this. I suspect the cause is exactly what I mentioned here:
Right now, it is any page that has a form, and sometimes they submit and then sometimes they don't. But this page, which we created as a blank test page is doing it.
https://sago.com/en/erin-form-test/
... and as predicted and described in the blog post, you’re loading from 2 different LP domains:
Line 1014:
<script src="//discover.sago.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_1573"></form> <script>MktoForms2.loadForm("//discover.sago.com", "775-OMN-861", 1573);</script>
Line 1212:
<script src="//discover.schlesingergroup.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_1355"></form> <script>MktoForms2.loadForm("//discover.schlesingergroup.com", "775-OMN-861", 1355);</script>
Thank you Sanford! This helped tremendously, turns out we had some custom hardcoded script in our header that we impacting all pages/forms.