Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 18. Aug 2018, 19:51

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Feedback URL handling
PostPosted: 30. Jul 2018, 12:57 
Offline

Joined: 28. Jul 2018, 22:05
Posts: 9
Hi Michael,
Appreciate the plugin and the help you've given me so far on codecanyon. I've got it working now and that's great but I'm running into an issue with an embedded widget and it's feedback url not loading in the iframe.

To recap:
Main site
http://dicdevelopmenttrust.com - Advanced Iframe with shortcode

CDN
https://cdn.rawgit.com/Castleland/Iframer/23d11d33/ai-external.js
External domain workaround with multisite & resize on element change enabled.

Iframe
https://planyo.com/booking/castleland-community-centre/

embedded with:
Code:
<script src="https://cdn.rawgit.com/Castleland/Iframer/23d11d33/ai-external.js"></script>


All working great.

However, there are a number of ways to embed widget calendars for easy booking however they load the page outside of the iframe instead of inside.

example:
This code
Code:
<script type='text/javascript' src='https://www.planyo.com/as.js'></script>
        <iframe id='calp_1470848868' style='width:100%;height:423px;' class='calprev_iframe caltype_multi-month-responsive' scrolling='no' frameborder='0' src='https://www.planyo.com/embed-calendar.php?resource_id=$(resource_id)&calendar=34264&style=multi-month-responsive&custom-language=EN&ifr=calp_1470848868&legend=hidden&show_prep_time=1&nox=1'></iframe>
    </div>


loads these calendars on a page
Image

When you click on the calendar date you are taken to the reservation form with the calendar date pre-selected but it's the https page in a separate window, not inside the iframe.

I need it to work inside the iframe, but I'm not sure what needs to be done.

Any advice would be greatly appreciated as always.


Top
 Profile  
 
PostPosted: 31. Jul 2018, 08:39 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10886
So you have an iframe inside your iframe.
It seems that this is in full control of www.planyo.com.

I think the problem is as they work inside an iframe already they use target="_blank" to jump outside the iframe.
Can you check which targets they have set?

it should be _parent

So you could ask them to change this.

As this is on the same domain you have access to this iframes if domains really match.
you have www.planyo.com and planyo.com which is for a browser a different domain. This needs to be aligned.

then you could write some Javascript which does change link targets. I have such code already in my plugin but you need this then not for the current page but inside the iframe.

Best, Michael


Top
 Profile  
 
PostPosted: 31. Jul 2018, 18:23 
Offline

Joined: 28. Jul 2018, 22:05
Posts: 9
Cheers for the quick response Michael.

Yes, Planyo appears to use iframes a lot in it's design.

I have access to all of the templates that are called within each page except a couple that aren't an issue.

The Calendars are dynamic and can be generated with a widget which allows you to customise the Javascript, but I'm unsure about whether you can change the target parameter. You can specify a feedback url though I don't know if that helps this situation
Image

The whole premise of Planyo is it's flexibility which is very good. There are templates for each section of the site that can be customised.

There is also an overarching site wrapper (which is where the ai-external.js is referenced).
Image

List of templates available:
Image

All of which are like the wrapper, in that you can customise the code inside. It doesn't give you direct access to any JS files though.

Quote:
So you could ask them to change this.

I will give it a go, but I have a feeling I know the answer.

Isn't there a way to intercept the JS onclick events without access to those files?

Quote:
As this is on the same domain you have access to this iframes if domains really match.
you have www.planyo.com and planyo.com which is for a browser a different domain. This needs to be aligned.


I get what you mean, but I have no control over those things unfortunately.

Side note: there are also a couple of pages where the resizing stops working (I tried embedding the ai_external.js script in the template for that page to see if it would fix it but no joy)
Planyo actually has an integration option into wordpress with a plugin, but its not the best and relies on duplication of information in the database which I'm trying to avoid (which is why the iframe site seemed like the best alternative idea).

To be honest this isn't something I've had much practice with so apologies if I'm a bit unsure or not helpful.

Thanks again Michael.


Top
 Profile  
 
PostPosted: 31. Jul 2018, 21:17 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10886
are you now able to use www.p... everywhere. I don'T see the problem.

Have you already checked which targets the calender links do have?

If the resize is not working please check the javascript console. Maybe something from my plugin is reported there.
Sometimes you need to e.g. add a timeout if something is loaded dynamically.

Best, Michael


Top
 Profile  
 
PostPosted: 1. Aug 2018, 12:57 
Offline

Joined: 28. Jul 2018, 22:05
Posts: 9
Right-clicking on the calendar shows the following type of link:
Code:
<td class="cur_month_day_nox nocuscol" onclick="window.open('https://www.planyo.com/booking.php?planyo_lang=EN&amp;mode=reserve&amp;prefill=true&amp;time_mode=full_day&amp;one_date=08%20Aug%202018&amp;start_date=08%20Aug%202018&amp;resource_id=104777')">8</td>

For every date on the calendar etc..
That's all I can see.

I'm still waiting on a response about the "_parent" question from the developers, hopefully they'll be willing to change it from "_blank"

Quote:
If the resize is not working please check the javascript console. Maybe something from my plugin is reported there.
Sometimes you need to e.g. add a timeout if something is loaded dynamically.


This is what is happening on the page that isn't resizing in the console:
Code:
Advanced iframe configuration error: You have enabled the resize of the iframe for pages on the same domain. But you use an iframe page on a different domain. You need to use the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed.
ai.js?ver=311305:62

DOMException: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame.
    at aiResizeIframe (http://dicdevelopmenttrust.com/Redux/wp-content/plugins/advanced-iframe/js/ai.js?ver=311305:23:36)
    at recalculateIframeadvanced_iframe (http://dicdevelopmenttrust.com/home/makeabooking/:347:75)
    at <anonymous>:1:1
ai.js?ver=311305:61

Advanced iframe configuration error: You have enabled the resize of the iframe for pages on the same domain. But you use an iframe page on a different domain. You need to use the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed.
ai.js?ver=311305:62

DOMException: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame.
    at aiResizeIframe (http://dicdevelopmenttrust.com/Redux/wp-content/plugins/advanced-iframe/js/ai.js?ver=311305:23:36)
    at recalculateIframeadvanced_iframe (http://dicdevelopmenttrust.com/home/makeabooking/:347:75)
    at <anonymous>:1:1


I've added a 500ms timeout, but it didn't make a difference.


Top
 Profile  
 
PostPosted: 1. Aug 2018, 14:04 
Offline

Joined: 28. Jul 2018, 22:05
Posts: 9
Weirdly I've noticed if you load a page from the page that isn't working and then go back to it, the resize is working :?

https://drive.google.com/open?id=13zFF9yMDzGkTcyuz6NMFrdJ-Tp_w-047


Top
 Profile  
 
PostPosted: 1. Aug 2018, 22:47 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10886
The use window open. So actually Therefore _parent would not work.

how have you configured resize on element resize? Seems you have enabled it for the same domain! make sure you have added
use_shortcode_attributes_only="true" or enable_external_height_workaround="true"

Best, Michael


Top
 Profile  
 
PostPosted: 3. Aug 2018, 12:10 
Offline

Joined: 28. Jul 2018, 22:05
Posts: 9
Hi Michael,

I've modified the shortcode to this:
Code:
[advanced_iframe src="https://www.planyo.com/booking.php?calendar=34264&mode=resource_list&planyo_lang=EN" width="100%" height="100%" id="advanced_iframe" hide_page_until_loaded="true" show_iframe_loader="true" enable_responsive_iframe="true" onload_resize="true" resize_on_ajax="100" resize_on_ajax_jquery="false" multi_domain_enabled="true" use_post_message="true" enable_external_height_workaround="true" ]


And here is the ai-external.js contents:

Code:
// load an external config from the inital site. Param config_id is checked from the url.
var doIt = loadExternalConfig(domain_advanced_iframe);

if (doIt) {
  // Variables are checked with typeof before because this enables that the user can
  // define this values before and after including this file and they don't have to set
  // them at all if not needed.
  var iframe_id_advanced_iframe;
  if (typeof iframe_id === 'undefined') {
      iframe_id_advanced_iframe = 'advanced_iframe';
  }  else {
      /* jshint ignore:start */
      iframe_id_advanced_iframe = iframe_id;
      /* jshint ignore:end */
  }

  var iframe_advanced_iframe_last_height = -1;

  if (typeof iframe_url_id === 'undefined') {
      var iframe_url_id = '';
  }
  // multisite support
  if (typeof domainMultisite === 'undefined') {
      var domainMultisite = 'true';
  }
  if (typeof post_message_domain === 'undefined') {
      var post_message_domain = '*';
  }
  if (domainMultisite === 'true') {
      // Check the referer
      var ref = document.referrer;
      // If found we exchange the domain.
      if (ref !== '') {
        var domainOrig = domain_advanced_iframe.split('/')[2];
        var multiDomain = ref.split('/')[2];
        domain_advanced_iframe = domain_advanced_iframe.replace(domainOrig, multiDomain);
      }
      post_message_domain = '*';
  }

  if (typeof usePostMessage === 'undefined') {
      var usePostMessage = true;
  }
  if (typeof debugPostMessage === 'undefined') {
      var debugPostMessage = false;
  }
  if (typeof dataPostMessage === 'undefined') {
      var dataPostMessage = '';
  }

  if (iframe_url_id !== '') {
     var value_id = aiGetUrlParameter(iframe_url_id);
     if (value_id !== '') {
        iframe_id_advanced_iframe = value_id;
     } else {
        var errorText = 'Configuration error: The id cannot be found in the url at the configured parameter.';
        alert(errorText);
        throw errorText;
     }
  }
  if (typeof updateIframeHeight === 'undefined') {
      var updateIframeHeight = 'true';
  }
  if (typeof onload_resize_delay === 'undefined') {
      var onload_resize_delay = 300;
  }
  if (typeof keepOverflowHidden === 'undefined') {
      var keepOverflowHidden = 'false';
  }
  if (typeof hide_page_until_loaded_external === 'undefined') {
      var hide_page_until_loaded_external = 'false';
  }
  if (typeof iframe_hide_elements === 'undefined') {
    var iframe_hide_elements = '';
  }
  if (typeof onload_show_element_only === 'undefined') {
      var onload_show_element_only = '';
  }
  if (typeof iframe_content_id === 'undefined') {
      var iframe_content_id = '';
  }
  if (typeof iframe_content_styles === 'undefined') {
      var iframe_content_styles = '';
  }
  if (typeof change_iframe_links === 'undefined') {
      var change_iframe_links = '';
  }
  if (typeof change_iframe_links_target === 'undefined') {
      var change_iframe_links_target = '';
  }
  if (typeof additional_js_file_iframe === 'undefined') {
      var additional_js_file_iframe = '';
  }
  if (typeof additional_js_iframe === 'undefined') {
      var additional_js_iframe = '';
  }
  if (typeof additional_css_file_iframe === 'undefined') {
      var additional_css_file_iframe = '';
  }
  if (typeof iframe_redirect_url === 'undefined') {
      var iframe_redirect_url = '';
  }
  if (typeof enable_responsive_iframe === 'undefined') {
      var enable_responsive_iframe = 'true';
  }
  if (typeof write_css_directly === 'undefined') {
      var write_css_directly = 'false';
  }
  if (typeof resize_on_element_resize === 'undefined') {
      var resize_on_element_resize = 'div#top_container';
  }
  if (typeof resize_on_element_resize_delay === 'undefined') {
      var resize_on_element_resize_delay = '';
  }
  if (typeof add_iframe_url_as_param === 'undefined') {
      var add_iframe_url_as_param = 'false';
  }
  if (typeof element_to_measure === 'undefined') {
      var element_to_measure = 'default';
  }
  if (typeof element_to_measure_offset === 'undefined') {
      var element_to_measure_offset = 0;
  }
  var modify_iframe_cookie_found = false;
  if (typeof modify_iframe_if_cookie === 'undefined') {
      var modify_iframe_if_cookie = false;
  }
  // This is a feature only mentioned in the readme.txt as it was only needed for a custom solution.
  if (typeof additional_styles_wrapper_div === 'undefined') {
      var additional_styles_wrapper_div = '';
  }
  if (typeof add_css_class_iframe === 'undefined') {
      var add_css_class_iframe = 'false';
  }
   if (typeof send_console_log === 'undefined') {
      var send_console_log = false;
  }

  // read optional jquery and resize on element resize paths!
  if (typeof jquery_path === 'undefined') {
      var jquery_path = 'http://dicdevelopmenttrust.com/Redux/wp-includes/js/jquery/jquery.js';
  }

  var iframeWidth = 0;
  var ia_resize_init_done_advanced_iframe = false;

  // redirect to a given url if the page is NOT in an iframe
  if (iframe_redirect_url !== '') {
       /* Add existing parameters */
      if ('' !== window.location.search && iframe_redirect_url.indexOf('?') ===-1) {
          iframe_redirect_url += window.location.search;
      }
      if (window===window.top) { /* I'm not in a frame! */
          location.replace(iframe_redirect_url);
      } else {
          /* we check if the referrer is the parent  */
          var ref = document.referrer;
          if (ref !== '') {
            var domainRedirect = iframe_redirect_url.split('/')[2];
            var domainRef = ref.split('/')[2];
            if (domainRedirect !== domainRef) {
                top.location.replace(iframe_redirect_url);
            }
          } else {
            /*  If no referer is found we redirect to the defined parent as this seems to be a fake include */
            top.location.replace(iframe_redirect_url);
          }
      }
  }

  // load jQuery if not available
  window.jQuery || document.write('<script src="' + jquery_path + '"></script>');

  // if responsive is enabled auto height has to be enabled as well.
  if (enable_responsive_iframe === 'true') {
      updateIframeHeight = 'true';
  }

  var modificationCookieSet = false;
  if (modify_iframe_if_cookie) {
    modificationCookieSet = getCookie("aiIframeModifications") == "true";   
  }
  if (typeof ia_already_done === 'undefined') {
      if (window!==window.top || modificationCookieSet) { /* I'm in a frame! */
          // dom is not fully loaded therefore jQuery is not used to hide the body!
          if (iframe_hide_elements !== '' || onload_show_element_only !== '' ||
              iframe_content_id !== '' || iframe_content_styles !== '') {
              if (document.documentElement && write_css_directly === 'false') {
                  document.documentElement.style.visibility = 'hidden';
              }
              // Solution if you want to remove the background but you see it for a very short time.
              // because hiding the iframe content does not help!
              //if (window != window.top) {
              //    document.write("<style>body { background-image: none; }</style>");
              //}
          }
      }
      var ia_already_done = false;
  }

  // add the aiUpdateIframeHeight to the onload of the site.
  addOnloadEvent(aiExecuteWorkaround_advanced_iframe);

  if (write_css_directly === 'true' && (window!==window.top || modificationCookieSet)) {
      writeCssDirectly();
  }
  if (additional_css_file_iframe !== '' && (window!==window.top || modificationCookieSet)) {
      document.write('<link rel="stylesheet" type="text/css" href="' + additional_css_file_iframe + '"/>');
  }
  if (additional_js_file_iframe !== '' && (window!==window.top || modificationCookieSet)) {
      document.write('<script src="'+additional_js_file_iframe+'"></script>');
  }
  if (additional_js_iframe !== '' && (window!==window.top || modificationCookieSet)) {
      document.write('<script>' + additional_js_iframe + '<\/script>');
  }

  // we overwrite console.log if it exists
  if (usePostMessage && send_console_log && console && console.log) {
     console.log = function() {
        var data = { 'aitype' : 'debug',
                     'id' : iframe_id_advanced_iframe,
                     'data' :  [].map.call(arguments, JSON.stringify)
                   };
        var json_data = JSON.stringify(data);
        parent.postMessage(json_data, post_message_domain);
     };
     window.onerror = function (msg, url, lineNo, columnNo, error) {
        var data = { 'aitype' : 'debug',
                     'id' : iframe_id_advanced_iframe,
                     'data' :  'ERROR: ' + msg + ' - ' + lineNo + ':' + columnNo
                   };
        var json_data = JSON.stringify(data);
        parent.postMessage(json_data, post_message_domain);
    };
  }
}


There aren't JS errors in the developer console since I've changed the shortcode, but it's still doing it :(


Top
 Profile  
 
PostPosted: 3. Aug 2018, 16:07 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10886
onload_resize="true" resize_on_ajax="100" resize_on_ajax_jquery="false" are only for the same domain.


resize_on_element_resize_delay is empty. can you set this please to a vaild number?

And what do you mean with doing it?

Best, Michael


Top
 Profile  
 
PostPosted: 3. Aug 2018, 16:46 
Offline

Joined: 28. Jul 2018, 22:05
Posts: 9
Ok, I've removed the redundant shortcode entries.

Quote:
resize_on_element_resize_delay is empty. can you set this please to a vaild number?


Changed it to 100.

Code:
2(index):337 Uncaught DOMException: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame.
    at HTMLIFrameElement.onload (http://dicdevelopmenttrust.com/home/makeabooking/:337:1431)


https://cdn.rawgit.com/Castleland/Iframer/ec32efc6/ai-external.js

Quote:
And what do you mean with doing it?


The shopping cart pager page is still showing a scrollbar on initial load, but not after reloading it. As shown in the video:
https://drive.google.com/file/d/13zFF9yMDzGkTcyuz6NMFrdJ-Tp_w-047/view

Image

Thanks again Michael.


Top
 Profile  
 
PostPosted: 3. Aug 2018, 20:56 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10886
1. about the iframe exception. http://dicdevelopmenttrust.com/home/makeabooking/ does not exists. so where do you get this?
2. if it does not work the first time but after a reload then maybe the timing is a problem. You can delay the first resize.
On the external workaround tab there is a option for this.

also you can set
multi_domain_enabled="true" use_post_message="true" in the administration directly then you don't need this at the shortcode.
also you should set use_post_message="debug" there because then the console log does report when a size was sent/received.

Best, Michael


Top
 Profile  
 
PostPosted: 6. Aug 2018, 15:56 
Offline

Joined: 28. Jul 2018, 22:05
Posts: 9
Hi Michael, thanks again for the response.
Quote:
1. about the iframe exception. http://dicdevelopmenttrust.com/home/makeabooking/ does not exists. so where do you get this?

It does exist, it's just private, so only works if you're logged in. I've made it public now so you can see it.

Quote:
2. if it does not work the first time but after a reload then maybe the timing is a problem. You can delay the first resize.
On the external workaround tab there is a option for this.


Here is the output of the debug console and postmessage debug enabled, going from start page all the way to the shopping cart page:

Code:
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36
Headers of https://www.planyo.com/booking.php?calendar=34264&mode=resource_list&planyo_lang=EN:
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate
Content-Type: text/html; charset=UTF-8
Date: Mon, 06 Aug 2018 13:44:57 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: Apache
Set-Cookie: PHPSESSID=tk9mqko1ma3pn3tjfkcu4turr6; path=/
Set-Cookie: PHPSESSID=04110l99je5m6p3j02lv6scp13; path=/
X-Powered-By: PHP/7.0.30
Connection: keep-alive
Set-Cookie: visid_incap_836884=nPB40ARRSoGpSM/Ao9PxptlQaFsAAAAAQUIPAAAAAABwS7FTmz1/rs2m0XJe/Vbs; expires=Tue, 06 Aug 2019 09:19:15 GMT; path=/; Domain=.planyo.com
Set-Cookie: nlbi_836884=X/hTJYD0fHTI/yVy7dRC8AAAAABmtof6+iAdw09/6BpA0VTu; path=/; Domain=.planyo.com
Set-Cookie: incap_ses_459_836884=wETjQ8QqoxP536tJHbNeBtlQaFsAAAAAjDR8RZiUKH5WAWjHL3VQ2w==; path=/; Domain=.planyo.com
Set-Cookie: ___utmvmvEuKYoX=uvFyZfzdPvs; path=/; Max-Age=900
Set-Cookie: ___utmvavEuKYoX=eiIlHRr; path=/; Max-Age=900
Set-Cookie: ___utmvbvEuKYoX=qZV
XzeOqalH: wti; path=/; Max-Age=900
X-Iinfo: 7-127277306-127277311 NNNN CT(0 0 0) RT(1533563097559 28) q(0 0 0 -1) r(4 4) U6
X-CDN: Incapsula

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 SecurityError: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame. - 396:1205

l: "postMessage received: !_{\"h\":\"\"} - origin: https://docs.google.com"

l: "The received message cannot be parsed and seems not to belong to advanced iframe pro. Please disable the postMessage debug mode if this o.k. and that this message is not shown anymore."

l: {}

l: "postMessage received: !_{\"h\":\"\"} - origin: https://docs.google.com"

l: "The received message cannot be parsed and seems not to belong to advanced iframe pro. Please disable the postMessage debug mode if this o.k. and that this message is not shown anymore."

l: {}

l: "postMessage received: {\"aitype\":\"height\",\"height\":2109,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

ERROR: Uncaught SecurityError: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame. - 396:1205

l: "postMessage received: {\"aitype\":\"height\",\"height\":159,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":1912,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":2018,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":2040,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":143,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":766,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":847,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":874,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":381,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

ERROR: Uncaught SecurityError: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame. - 396:1205

l: "postMessage received: {\"aitype\":\"height\",\"height\":1131,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

ERROR: Uncaught SecurityError: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame. - 396:1205

l: "postMessage received: {\"aitype\":\"height\",\"height\":1831,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":2109,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

ERROR: Uncaught SecurityError: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame. - 396:1205

l: "postMessage received: {\"aitype\":\"height\",\"height\":159,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"

l: "postMessage received: {\"aitype\":\"height\",\"height\":381,\"width\":1170,\"id\":\"advanced_iframe\",\"data\":{}} - origin: https://www.planyo.com"


The times with 381 as the height are the shopping cart page. First time with scroll bar. Second time resized fine.

I've changed the delay to 800ms but it hasn't made much of a difference.


Top
 Profile  
 
PostPosted: 7. Aug 2018, 08:23 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10886
can you check who is doing this:
ERROR: Uncaught SecurityError: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame.

so the 159 is the height with his too small and 381 then the correct one?

The delay is 300 ms. Maybe this is not enough. and also is div#top_container the element that does change the size after load on this page also?

Best, Michael


Top
 Profile  
 
PostPosted: 7. Aug 2018, 12:56 
Offline

Joined: 28. Jul 2018, 22:05
Posts: 9
Quote:
is div#top_container the element that does change the size after load on this page also?

The div#top.container is a wrapper on every page as part of a wrapper template.
Image

Quote:
The delay is 300 ms. Maybe this is not enough.


ai-external.js has 800 set as the delay.
Code:
if (typeof onload_resize_delay === 'undefined') {
      var onload_resize_delay = 800;


Quote:
so the 159 is the height with his too small and 381 then the correct one?


381 is the correct one, but it shows 381 even on first load(not working) and then on reload(working).

Code:
(index):337 Uncaught DOMException: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame.
    at HTMLIFrameElement.onload (http://dicdevelopmenttrust.com/home/makeabooking/:337:1533)
onload @ (index):337
(index):332 postMessage received: {"aitype":"height","height":1912,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
2booking.php?calendar=34264&feedback_url=https%3A%2F%2Fwww.planyo.com%2Fbooking.php%3Fcalendar%3D34264&mode=reserve&planyo_lang=en&prefill=true&resource_id=105032&one_date=&start_time=&end_time=:1 [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(index):332 postMessage received: {"aitype":"height","height":2018,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
booking.php?calendar=34264&feedback_url=https%3A%2F%2Fwww.planyo.com%2Fbooking.php%3Fcalendar%3D34264&mode=reserve&planyo_lang=en&prefill=true&resource_id=105032&one_date=&start_time=&end_time=:1 [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
(index):332 postMessage received: {"aitype":"height","height":1912,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
(index):332 postMessage received: {"aitype":"height","height":2018,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
(index):332 postMessage received: {"aitype":"height","height":2040,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
(index):332 postMessage received: {"aitype":"height","height":143,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
(index):332 postMessage received: {"aitype":"height","height":962,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
(index):332 postMessage received: {"aitype":"height","height":1043,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
(index):332 postMessage received: {"aitype":"height","height":1070,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com
(index):332 postMessage received: {"aitype":"height","height":381,"width":1170,"id":"advanced_iframe","data":{}} - origin: https://www.planyo.com

This is up to the first time the shopping cart page is loaded. No other page has the issue, and the error doesn't come up on the last line when the page has already loaded and has the issue.
So I don't believe
Code:
Uncaught DOMException: Blocked a frame with origin "http://dicdevelopmenttrust.com" from accessing a cross-origin frame.
    at HTMLIFrameElement.onload (http://dicdevelopmenttrust.com/home/makeabooking/:337:1533)
onload @ (index):337

Is the problem, as it doesn't occur when loading the shopping cart page, and I believe it's because planyo loads content dynamically and uses iframes like you mentioned earlier (but the wrapper file has the ai-external.js script)

What I think might be the problem, when loading up the shopping cart for the first time, it scrolls to an anchor point I think, but when reloaded it doesn't. Could that play a factor?


Top
 Profile  
 
PostPosted: 7. Aug 2018, 20:40 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10886
So you think the resize itself is not working properly at this point.

If I open the js directly I still see the 300.
But you can try to set it to e.g. 5000 and reload the js that it is now cached.
Then you see if the anchor is doing some harm here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy