Embed Iframe from web widget not working

1813
5
Jump to solution
08-05-2021 05:11 AM
ChrisMaclaurin
New Contributor III

Hi all I am trying to embed a created HTML widget from bathing water quality design page (https://environment.data.gov.uk/bwq/widget/configure/widget1?siteId=ukj2402-15650). the follwing HTML works in browsers but not when I try to embed into storymaps.

<iframe frameborder='0' id='widget-frame' lang='en' scrolling='no' src='https://environment.data.gov.uk/bwq/widget/widget/widget1?eu=http://environment.data.gov.uk/id/bathi...' style='width:300px;height:326px' title='edit.title' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'></iframe>

It should look like this...

Widget.JPG

Can anyone help as to why this wont work in StoryMaps?

Thanks

Chris

 

0 Kudos
1 Solution

Accepted Solutions
OwenGeo
Esri Notable Contributor

@ChrisMaclaurin -- We change all http links to https because our security best practices require that any request made by the story page is over https.

There is a URL parameter in your iframe that makes a request over http:

Screen Shot 2021-08-05 at 10.32.04 AM.jpg

This is not a best practice for web security. It is highly recommended that all websites support the secure https protocol; however, since that http request is made by a different server we can actually make an adjustment of how our logic is applied to allow that http request since the request made by the story page still occurs over https.

We'll plan to add this change in our release next week, so try again later next week and this should work!

Owen Evans
Lead Product Engineer | StoryMaps

View solution in original post

0 Kudos
5 Replies
FourCornersMapping
New Contributor III

Are you trying to embed in the pane or the main media frame? What happens when you try to embed?  I have had embeds not work when embedding in the pane, including other story maps and iframe code. The user has to open the link in a separate tab. But the same embed works when used in the main media frame. The caveat there is that it won't work on a mobile --you just see a static thumbnail with a link to open the media on a new tab. 

0 Kudos
OwenGeo
Esri Notable Contributor

@ChrisMaclaurin -- We change all http links to https because our security best practices require that any request made by the story page is over https.

There is a URL parameter in your iframe that makes a request over http:

Screen Shot 2021-08-05 at 10.32.04 AM.jpg

This is not a best practice for web security. It is highly recommended that all websites support the secure https protocol; however, since that http request is made by a different server we can actually make an adjustment of how our logic is applied to allow that http request since the request made by the story page still occurs over https.

We'll plan to add this change in our release next week, so try again later next week and this should work!

Owen Evans
Lead Product Engineer | StoryMaps
0 Kudos
ChrisMaclaurin
New Contributor III

Appreciate this @OwenGeo I hadn't noticed this, though this is not my doing, but how the request works from the development page I am creating the widget from. I'm just copying the iframe link after I've chosen the styling I like.

Chris

0 Kudos
OwenGeo
Esri Notable Contributor

@ChrisMaclaurin -- Yep, understood. That was one of the reasons we looked into trying to make this work since we figured you couldn't really do anything to change the way this service was working.

We've got the fix running in our dev environment (see below), so we're on track for getting it out in next week's release...

Screen Shot 2021-08-05 at 5.23.08 PM.jpg

Owen Evans
Lead Product Engineer | StoryMaps
ChrisMaclaurin
New Contributor III

Sorry, it's been a while.. yes this is working fine now... I just had to get back to the the creators of the web widget in the first place as the code was not inserting the Name! But all is well the the display in storymaps.

Thanks for your work on this

Cheers