I made a form within mautic and embedded it in my Wordpress website via the plugin. When loading the page, I can see the following error in the browser console:
XMLHttpRequest cannot load http://my.mautic.domain/index.php/mtc. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://my.website.domain' is therefore not allowed access.
After filling out the form, the following errors appear in the browser console:
POST http://my.mautic.domain/index.php/form/submit?formId=1 500 (Internal Server Error)
Uncaught SecurityError: Blocked a frame with origin "http://my.mautic.domain" from accessing a frame with origin "http://my.website.domain". Protocols, domains, and ports must match.
How can I bypass these errors? Needless to say that the form does not work, the button label says “Please wait…” and nothing happens.
I am using a self hosted version (2.2.1) and had no problems so far with simple email campaigns.