Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • @thom13
    I used a quick fix to modify ko-calendar.php – just add an https: prefix to the script reference to Google API client //apis.google.com/...

    More technically, I appied the following patch:

    --- ko-calendar.php.orig	2014-12-31 13:42:47.000000000 +0100
    +++ ko-calendar.php	2014-12-31 13:43:42.000000000 +0100
    @@ -162,7 +162,7 @@
     			wp_enqueue_script('date-js', plugins_url('/date.js', __FILE__), null, 'alpha-1');
     			//wp_enqueue_script('ko-calendar-test', plugins_url('/ko-calendar-test.js', __FILE__), array('date-js', 'google'));
     			wp_enqueue_script('ko-calendar');
    -			wp_enqueue_script('googleclient', '//apis.google.com/js/client.js?onload=ko_calendar_google_init', array('ko-calendar'));
    +			wp_enqueue_script('googleclient', 'https://apis.google.com/js/client.js?onload=ko_calendar_google_init', array('ko-calendar'));
     		}
     	}

    @poco
    I suspect we are talking past each other. My point is that a non HTTPS request for Google client.js won’t work, Google seems to only respond to a secured request. I checked this with Firebug’s network communication monitor.

    If you use a src='//apis.google.com... reference in an HTTP webpage, an HTTP request for Google client.js is generated, which won’t get a response ever. It might work if used in an HTTPS webpage, as it generates an HTTPS request for Google client.js, but that is not our case or the case of https://jewishvancouverusa.org/ or https://www.willowlake.ca

    Thx for your quick response. There is a dozen plugins, not sure which one adds the prefix. But I’ve found out using Firebug on the homepage of the OP that it doesn’t seem to work even with src='//apis.google.com.... My Firefox 34.0.5 resolves it to:
    https://apis.google.com/js/client.js?onload=ko_calendar_google_init&ver=4.0.1 which never gets an HTTP response. If you put this URL directly into the address box of the browser, it somehow rewrites to https://... and DOES get a response. However, if you have it in the <script> tag, it DOESN’T.

    I’ve worked around it on our site by adding an explicit https://apis.google.com... link to the graphical template header, so it works somehow. The OP seems to be using a similar workaround.

    (Next I am trying to address the localization of date and time formats.)

    Same problem with the latest version 1.4.5 of the plug in.
    Our homepage https://oaza.mnisek.cz/ seems to fail at loading Javascript:

    <script type='text/javascript' src='https://oaza.mnisek.cz//apis.google.com/js/client.js?onload=ko_calendar_google_init...

    The homepage of the OP seems to refer to it without the prefix:

    <script type='text/javascript' src='//apis.google.com/js/client.js?onload=ko_calendar_google_init...

    Could that be the cause? Can I somehow fix it from wp-admin?

Viewing 4 replies - 1 through 4 (of 4 total)