Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

iFrame shows correct and then disappears... --> Solved
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4194
Page 1 of 1

Author:  marcverkade [ 14. Dec 2016, 18:36 ]
Post subject:  iFrame shows correct and then disappears... --> Solved

Hello,

I have been trying to get Advanced iFrame working a while ago unfortunately without success.
This week one of my customers wants me to use it again to show a webpage insite his website.

So I installed the latest version of Wordpress and Advanced iFrame Pro and try to get it working.

As you can see on this site the initially the iFrame shows and scales correctly but than the contents disappear.
http://wordpress.extravestiging.nl/extravestiging-webshop/

Both websites are on the same server and belong to the same domain. I use this shortcode:

[advanced_iframe securitykey="the key is here" use_shortcode_attributes_only="true" src="http://www.extravestiging.nl" width="1024" height="600" id="EVWebshop" name="EVWebshop" auto_zoom="same"]

Removing the auto_zoom="same" shows the website but then the footer is displayed over the iFrame since the iFrame is not zoomed, so that is no option. Any other website just failes to show in the iFrame. Any clue what is happening and why the iFrame is not showed correctly?

Regards, Marc

Author:  TinyWebGallery [ 15. Dec 2016, 00:13 ]
Post subject:  Re: iFrame shows correct and then disappears...

Do you really need zoom? Can you create the other scenario for me also? So modifying xss dynamically is maybe a better option.

Best Michael

Author:  TinyWebGallery [ 15. Dec 2016, 00:21 ]
Post subject:  Re: iFrame shows correct and then disappears...

And what do you mean with any other website? Have you checked them with my free iframe checker?

Best Michael

Author:  marcverkade [ 28. Dec 2016, 17:04 ]
Post subject:  Re: iFrame shows correct and then disappears...

Hai Michael,

Thanx for your reply.. Yes of coarse I used the iFrame checker and it turned out that the site is OK to use in an iFrame.
The same shortcode worked OK a few versions ago when I tried to use iFrame Pro in 2015, so something apparently changed causing this behaviour.

Auto_zoom means IMHO that the height/width of the iFrame is adjusted according to the site inside the iFrame, that is what I need... The iframe should adjust the height according to the height of the site inside and setting Auto_zoom="same" is the easiest way to do it.

However, when using "same" or the new option setting the document.domain the site in the iFrame is first showed (flashing) correctly and then vanishes as you can see at the URL I provided http://wordpress.extravestiging.nl/extravestiging-webshop/

Eventually I got everything working when using the external workaround but I find it strange that I cannot get the auto-height working using "same" and have to use the external workaround, even though the main site and the iFrame site reside on the same server/domain.

"And what do you mean with any other website?"
It does not matter what website I specify in the src , it always vanishes when setting auto_zoom="same". Perhaps that gives you a clue?

Regarding your questing: "Do you really need zoom? Can you create the other scenario for me also? So modifying xss dynamically is maybe a better option."
I do not understand what you mean...

Regards, Marc

Author:  marcverkade [ 28. Dec 2016, 17:08 ]
Post subject:  Re: iFrame shows correct and then disappears...

This is the code in the page aource... Note the width="1" which causes the issue...

<iframe id="EVWebshop" name="EVWebshop" src="http://www.extravestiging.nl" width="1" height="600" frameborder="0" border="0" allowtransparency="true" onload=";zoomOnLoadEVWebshop();"></iframe>

Author:  TinyWebGallery [ 28. Dec 2016, 21:00 ]
Post subject:  Re: iFrame shows correct and then disappears...

Hi,

www.extravestiging.nl and wordpress ARE different domains for a browser. This is nothing we can change ;).

But you can use the external workaround for the same domain. Go to the external workaround tab. there is a box: If you are on a subdomain.
Then only have to include one single line of JS and then you can configure it the same way as if you are on the same domain.

If you say it was working last year I assume that there you had the iframe really on the same domain!

Currently you get:

Uncaught DOMException: Blocked a frame with origin "http://wordpress.extravestiging.nl" from accessing a cross-origin frame.
at aiGetIframeWidth (http://wordpress.extravestiging.nl/wp-content/plugins/advanced-iframe/js/ai.js?ver=603503:76:47)
at aiAutoZoom (http://wordpress.extravestiging.nl/wp-content/plugins/advanced-iframe/js/ai.js?ver=603503:943:24)
at zoomOnLoadEVWebshop (http://wordpress.extravestiging.nl/extravestiging-webshop/:295:16)
at HTMLIFrameElement.onload (http://wordpress.extravestiging.nl/extravestiging-webshop/:291:760)

in the Javascript console. You can fix this if you do what I have written before.

Best, Michael

Author:  marcverkade [ 4. Aug 2017, 19:04 ]
Post subject:  Re: iFrame shows correct and then disappears... --> Solved

Just to finish this post:
The problem was that iFrame Pro measured the wrong element, see other threat (element_to_measure)...
regards, Marc

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/