I am trying to: Link an i-framed page to our site. The PAGE is blank, but the page template is set as such: <h6>Note: This page is best viewed in horizontal landscape on small mobile devices:</h6>
<div class="container-fluid">
<div class="row">
<iframe src="[types field="url" output="raw"][/types]" width="625" height="1500" frameborder="0"></iframe>
</div>
</div>
When the page loads, it cannot find the URL we are trying to display
Link to a page where the issue can be seen: hidden link
I expected to see: According to the assistant, they want to display this page: hidden link
Instead, I got: Page couldn't load. Where do I change/look at the link?
Hi, it looks like the vid.us URL redirects to a different URL:
hidden link
Place the full redirect URL in the URL custom field instead of the vid.us URL and see if the iframe page loads as expected.
Hello Christian,
Just for your information, the problem is that it is no longer possible to use a different protocol for iframes on a site. This means we cannot mix http and https when adding an iframe. This mixed active content is now blocked by all major browsers. As a temporary fix, I just added an outside link to the page they wanted to display.
Thanks,
Tracey
Just for your information, the problem is that it is no longer possible to use a different protocol for iframes on a site. This means we cannot mix http and https when adding an iframe. This mixed active content is now blocked by all major browsers.
I see, thank you, though I'm not sure Toolset can provide the best solution. Our software can't change the way browsers handle mixed content. If you have http protocol URLs stored in custom fields, then the Types field shortcodes will return http protocol URLs. There's no dynamic protocol feature built-in that changes those URLs based on the current site protocol - the URL is just a text string stored in the database. It seems like the best long-term answer here is to reroute all your site traffic to https, and point all the iframes at https URLs. That will require server-level intervention by your host and various site configuration changes, or another 3rd-party plugin. Toolset doesn't offer an http to https migration tool.
A simpler option is to remove the http: and https: from all the iframe src URLs and use a "relative" protocol like this:
The protocol will be interpreted relative to the current visitor. If they are viewing your site in http, the iframe will load in http. If viewing in https, the iframe will load in https. One problem with this approach is that you cannot store a relative URL in a Toolset URL field. It's considered an invalid URL by our field validation scripts despite being perfectly acceptable as an iframe src. So you would have to use a different field like a simple text field to store the relative protocol URL. Simpler approach, but long-term it's probably best to move to https.