Https problem

(Mautic v. 2.8.1)

I’m using Channels -> Focus items, to insert a form on a site.

But when the form is submitted on the remote site the submit button keeps displaying “Please Wait”

The problem is that the form action is set to:

action="//mysite.ex"

If I manually change the action to:

action=“https://mysite.ex

the form works.



My mautic site uses SSL / https

And Configuration -> System Settings -> Site URL, is set with https://xxx.xxx.xx



Am I missing something?

I try to find the code that generates the url for the form action, but no luck so far.



Any advice on the problem or where I may find the form code would highly appreciated :)



Kind regards

Hasse

(Mautic v. 2.8.1)
I’m using Channels -> Focus items, to insert a form on a site.
But when the form is submitted on the remote site the submit button keeps displaying “Please Wait”
The problem is that the form action is set to:
action="//mysite.ex"
If I manually change the action to:
action=“https://mysite.ex
the form works.

My mautic site uses SSL / https
And Configuration -> System Settings -> Site URL, is set with https://xxx.xxx.xx

Am I missing something?
I try to find the code that generates the url for the form action, but no luck so far.

Any advice on the problem or where I may find the form code would highly appreciated :slight_smile:

Kind regards
Hasse

//your-domain.com is coming by default this is used in case your website use HTTPS or HTTP the form will look for both options.

If you enable HTTPS after install Mautic go to forms select all form and use rebuild forms.

Hi ninjoan, and thank you for your answer.
Both rebuild forms and clear cache did not solve the problem.

A few words about my setup

My-Mautic-server:
The domain and server Mautic is hosted on. All access to the domain is redirected to https. (ex. https://my-mautic.com).
Apache:

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]

My-Content-server:
The domain of my webpage. All access to the domain is by http. (ex. http://holiday-is-great.com)

The problem

When the Mautic javascript is included on My-Content-server, the generated form is set to use http.
The form is not submitted and Chrome complains:

my-mautic.com/form/submit?formId=3:1 GET https://my-mautic.com/form/submit?formId=3 403 (Forbidden)

app.js?v9204458e:216 Uncaught DOMException: Blocked a frame with origin "https://my-mautic.com" from accessing a cross-origin frame. at HTMLDocument.<anonymous> (https://my-mautic.com/media/js/app.js?v9204458e:216:67) at fire (https://my-mautic.com/media/js/libraries.js?v9204458e:328:299) at Object.fireWith [as resolveWith] (https://my-mautic.com/media/js/libraries.js?v9204458e:333:198) at Function.ready (https://my-mautic.com/media/js/libraries.js?v9204458e:340:11) at HTMLDocument.completed (https://my-mautic.com/media/js/libraries.js?v9204458e:340:291) (anonymous) @ app.js?v9204458e:216 fire @ libraries.js?v9204458e:328 fireWith @ libraries.js?v9204458e:333 ready @ libraries.js?v9204458e:340 completed @ libraries.js?v9204458e:340

My proposed solution

Find the form generating function in the source and make an option to force Mautic to use https:// and not //

Would it make sense to do that or is there another way? :slight_smile:

Hi Hasse,

I know this is 3 years later but I’m running into the same issue. What did you end up doing?

same here, any updates? I hate these bugs!!!

Hi, I don’t know about such bug. All works good by me.
Try to fix your https first, google gave me this great article: