SOLVED

MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Go to solution
Mike_Rojas
Level 2

MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Embedded forms not submitting in FireFox Private mode.  We are using a CNAME to load the form but it looks like there is an additional script on the Marketo side that is loaded with a Marketo CNAMe and not our custom CNAME.  Is this something we can control?

Screen Shot 2019-10-08 at 8.59.46 AM.pngScreen Shot 2019-10-08 at 9.02.01 AM.png

The script is loaded with our CNAME though it's loading the forms.js from the Marketo domain.  Can this be updated to use our CNAMe as well?  

Is there another way around this issue?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Ugh, I though this had been fixed permanently before. Guess we have to use my workaround still.

Upload this file to your Design Studio assets:

   Marketo Forms 2 Cross Domain request proxy frame 

Refer to that file in your options before loading the form:

<script src="//p.highspot.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_2998"></form>
<script>
MktoForms2.setOptions({
formXDPath:"/rs/623-OHN-043/images/marketo-xdframe-relative.html"
});
MktoForms2.loadForm("//p.highspot.com", "623-OHN-043", 2998);
</script>

Demo:

   MktoForms2 :: XDFrame relative path for Tracking Protection

View solution in original post

16 REPLIES 16
SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Pls provide the URL of this page.

Also, terminology FYI: the CNAME of your LP Domain/Domain Alias is <accountstring>.mktoweb.com. The LP Domain is an *alias*. 

In other words, the CNAME is the right-hand-side of a CNAME DNS record, not the left.

Mike_Rojas
Level 2

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Ugh, I though this had been fixed permanently before. Guess we have to use my workaround still.

Upload this file to your Design Studio assets:

   Marketo Forms 2 Cross Domain request proxy frame 

Refer to that file in your options before loading the form:

<script src="//p.highspot.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_2998"></form>
<script>
MktoForms2.setOptions({
formXDPath:"/rs/623-OHN-043/images/marketo-xdframe-relative.html"
});
MktoForms2.loadForm("//p.highspot.com", "623-OHN-043", 2998);
</script>

Demo:

   MktoForms2 :: XDFrame relative path for Tracking Protection

Mike_Rojas
Level 2

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

We have deployed this and forms are working in Private mode now. Thank you! 

SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Great, I'll add this to the Products blog soon.

Michael_DeRosa
Level 2

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Hi Sanford, 

We've tried to apply the suggested fix, but are now getting the following errors: 

The resource from “//go.mydomain.com/rs/[marketo code]/images/marketo-xdframe-relative_files/forms2.min.js.download” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).marketo-xdframe-relative.html

So, since forms2.min.js.download is blocked, the proxy page throws this error: 

Uncaught ReferenceError: MktoForms2 is not defined
at marketo-xdframe-relative.html:8
at marketo-xdframe-relative.html:46

Unfortunately we don't have access to the server to modify the "X-Content-Type-Options" setting immediately, and I'm not sure we'd want to remove the nosniff anyway. Is there a work-around for this? 

Michael_Sogunro
Level 2

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Hi Sanford,

I cannot get this to work. Can you take a look if you have a moment?

<script src="//page.uschamber.com/js/forms2/js/forms2.min.js">
</script>
<form id="mktoForm_2325"></form>
<script>
MktoForms2.setOptions({
formXDPath:"/rs/432-UWH-935/images/marketo-xdframe-relative.html"
});
MktoForms2.loadForm("//page.uschamber.com", "432-UWH-935", 2325);
</script>

SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

This is wrapped up in a blog post now, pls check there for details: https://nation.marketo.com/community/product_and_support/blog/2019/11/12/really-finally-winning-the-...

SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 is not defined in Marketo Forms 2 Cross Domain request proxy frame script.

Please point to the the page you're using to test. text/html isn't a mismatch for the HTML content.