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

Unable to adjust iframe to content in PRO version
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4507
Page 1 of 2

Author:  favian [ 4. Jan 2018, 22:31 ]
Post subject:  Unable to adjust iframe to content in PRO version

I was able to resize the iframe to content in the free version. However, after I bought the PRO version it's not working anymore.

I'm using external workaround. The shortcode looks like this:

[advanced_iframe securitykey="xxxxxxxxxxxxxxxx" use_shortcode_attributes_only="true" src="<link_to_my_external_page>" width="100%" height="600" scrolling="no" add_iframe_url_as_param="remote" enable_responsive_iframe="true" enable_external_height_workaround="true" onload_resize="true" onload_resize_width="true" multi_domain_enabled="true"]

Can you please help me out?

Author:  TinyWebGallery [ 4. Jan 2018, 22:52 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

You used the shortcode above in the free version? Because some of the settings are for the pro version only.

I recommend that you go to the external workaround page and switch to post message first. You can set it to debug. Than you can see the communication in the Javascript log.

onload_resize="true" onload_resize_width="true" are for the same domain only. So no need to specify this.
And why have you multidomain enabled? Do you have this setup?

And what have you configured on the external workaround tab? because this is saved to the ai_external.js.

Best, Michael

Author:  favian [ 5. Jan 2018, 15:54 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

Hi Michael,

I bought the PRO version, that's the one I'm using.

I've also tried the following shortcode configuration and it still doesn't adjust the iframe to the content.

[advanced_iframe securitykey="***" use_shortcode_attributes_only="true" src="http://<my_embedded_page>" width="100%" height="500" scrolling="no"].

In the external workaround, I have "Resize remote iframe to content height" with the "External" option selected.

What is interesting is that in the free version I had it working. After that, I bought and installed the PRO and it didn't work. Then, I uninstalled the PRO and install the free again and it's still not working :o

What am I missing?

Thanks

Author:  favian [ 5. Jan 2018, 18:58 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

This is a message from the error console in the bottom:


User agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
Headers of http://<my_external_page>:
HTTP/1.1 200 OK
Date: Fri, 05 Jan 2018 16:53:52 GMT
Server: Apache
p3p: CP=CAO PSA OUR
Content-Length: 6347
Content-Type: text/html; charset=ISO-8859-1

The page does exist and no X-Frame-Options header was found. But there can still be a iframe blocker script on this page. Go here for a full check.

ERROR: Uncaught SyntaxError: Unexpected token ; - 822:81

l: "YT API ready 2"

Author:  favian [ 5. Jan 2018, 21:12 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

If I just installed the PRO version, with the default settings, what would be the shortcode to make my iframe auto adjust the height to the content of an External page?

e.g:

www.externalpage.com/mypage.html

Author:  TinyWebGallery [ 5. Jan 2018, 22:28 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

In the shortcode you actually only need the src, width=100% and a default height.

So
[advanced_iframe securitykey="***" use_shortcode_attributes_only="true" src="http://<my_embedded_page>" width="100%" height="500" scrolling="no"]

is perfectly fine.

ERROR: Uncaught SyntaxError: Unexpected token ; - 822:81

is what bothers me. Have you set "Post message communication" on the external workaround tab to debug?

I think the Javascript error above kills everything.

Do you have a url where I can check?

Best, Michael

Author:  TinyWebGallery [ 5. Jan 2018, 22:33 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

l: "YT API ready 2" is a message from youtube.

can you check in the Javascript console of e.g. chrome where
n ; - 822:81 happens - which file is causing it?

Best, Michael

Author:  favian [ 5. Jan 2018, 23:51 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

I installed the free version back and it works. I have 2 pics from 2 errors I'm having with ai.external.js in the PRO version

I realized that when I install the PRO version, I got a big amount of code under the "Basic Settings" tab. Like if something were broken.

Attachments:
2.png
2.png [ 45.58 KiB | Viewed 3933 times ]
1.png
1.png [ 53.74 KiB | Viewed 3933 times ]

Author:  TinyWebGallery [ 6. Jan 2018, 00:32 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

Right. Sorry this is a bug in my file.

Can you open js\ai_external.template.js and remove the ; at the end of line 822.
Go to the administration and save the settings again.

I already posted a fix to codecanyon. But this might takes some days until they update...

http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message
already works again!

Best, Michael

Author:  TinyWebGallery [ 6. Jan 2018, 00:53 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

version 7.5.3 is at review at codecanyon.

Best, Michael

Author:  favian [ 10. Jan 2018, 16:39 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

Hi Michael,

I already updated my PRO version to v7.5.3.

However, the extended lines of code continue under the Basic Settings tab. Is it supposed to be like that?

I have a screenshot for you to review.

Regards,

Favian

Attachments:
Untitled.png
Untitled.png [ 166.07 KiB | Viewed 3915 times ]

Author:  favian [ 10. Jan 2018, 16:41 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

If you notice, the vertical scroll bar is all the way up, giving the idea of how much code it's in there.

Author:  TinyWebGallery [ 10. Jan 2018, 17:35 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

I see - and no - is should not be like this.
Does this come right away? because I don't have this. because you also have the user data shown. Have you clicked this?

But is the Javascript error gone and your feature works now again?

Best, Michael

Author:  TinyWebGallery [ 10. Jan 2018, 17:41 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

also the check all iframes button is missing...
also the php code shown there is very strange.

which php version are you running.

Best, Michael

Author:  TinyWebGallery [ 10. Jan 2018, 17:53 ]
Post subject:  Re: Unable to adjust iframe to content in PRO version

Also I checked the php part of your screenshot.

e.g. get_userdata

This is NOT part of my code. it is not used at all. So I don't know which version you have there!
Please make a clean install! Seems you have maybe hacked files

Best, Michael

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