Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Poco

    (@poco)

    I’m on mobile, but it appears to be working for me now. Did you fix it?

    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?

    Plugin Author Poco

    (@poco)

    I don’t know why your version would do that. Could it be some sort of plugin that is doing that? Do you have any plugins that might alter the URLs?

    What Plugins do you have installed?

    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.)

    Plugin Author Poco

    (@poco)

    The protocol relative URL using // instead of https:// or https:// is supposed to let the browser decide how to download the content by using the same “scheme” or protocol of the current request.

    So if you are on an https:// page it will download the file as http and if you are on an https:// page it will download the file as https (and if you are on a local file system using file:// it will download as “file” which won’t work correctly.

    Your page was rewriting the URL by prepending your own server path to the URL. This is probably happening because somewhere there is a plugin or some other code that is looking for a path of “/path/file” and turning that into a “https://myserver/path/file&#8221; because otherwise it wouldn’t be valid. It isn’t recognizing that “//server/file/path” is something different and should not be overwritten since the browser will figure out what to do with it.

    I’m glad your found a workaround for the problem, but you might have more of these problems in the future since protocol relative URLs are a better way, in general, to download files.

    I’m having the same problem after upgrading the plugin to 1.4.5. The Google API key was properly generated and then configured in the plugin settings.

    Nothing else has changed but now I get a quick spinner when the page loads and then an empty area where the widget used to appear.

    https://www.cjepac.com

    Any help or guidance would be appreciated. Thanks!

    Plugin Author Poco

    (@poco)

    @gregmcd

    Your calendar ID is still using the old URL, not the new ID format.

    Change your calendar ID from this

    https://www.google.com/calendar/feeds/1lfpq686ipbj8q9kcqvqipm31k%40group.calendar.google.com/public/full

    to this

    [email protected]

    Thanks for the quick response. That did the trick!

    I’m having the same problem. I tried to do what you suggested to GregMcD but I think I’m messing that up somehow, too.

    The widgets are on https://www.willowlake.ca and https://www.willowlake.ca/impact

    Help, please? ??

    @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

    @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'));
     		}
     	}

    @oaza.mnisek @poco

    I too have had the same problem, but following the suggestions above have solved it for my site.

    To get it working I had to:
    1) Get a browser api key
    2) Edit the calendar ID in the widget to just be the code next to “Calendar ID:” in the google calendar address field. In my case this is just the email address of the calendar account [email protected]. Note: make sure that the address contains an @ sign and not a percent40 as percent40 doesn’t work.

    Adding https: to the apis line in ko-calendar.php was not necessary.

    Plugin Author Poco

    (@poco)

    Alright, there are a few different issues being discussed here. Please start a new thread if you have a new issue.

    @thom13

    When loading your page, the following errors occur in the browser console. I am having trouble finding the public calendars [email protected] and [email protected]. Are you sure these are the IDs of your calendars? Are they public?

    Error downloading Calendar [email protected] : Not Found ko-calendar.js:18
    Error downloading Calendar [email protected] : Not Found ko-calendar.js:18

    This is due to an error coming back when retrieving the calendar from the following URL (you can see that in your browser debugger as well)

    https://content.googleapis.com/batch?key=AIzaSyAOLo4NySMHS9Z-2CHI5Kjymj1WFCivojY

    --batch_z-oHPbZ58LY_ABCtXOftAVw
    Content-Type: application/http
    Content-ID: <[email protected]>
    
    HTTP/1.1 404 Not Found
    Content-Type: application/json; charset=UTF-8
    Date: Mon, 05 Jan 2015 16:20:24 GMT
    Expires: Mon, 05 Jan 2015 16:20:24 GMT
    Cache-Control: private, max-age=0
    Content-Length: 165
    
    {
     "error": {
      "errors": [
       {
        "domain": "global",
        "reason": "notFound",
        "message": "Not Found"
       }
      ],
      "code": 404,
      "message": "Not Found"
     }
    }
    
    --batch_z-oHPbZ58LY_ABCtXOftAVw
    Content-Type: application/http
    Content-ID: <[email protected]>
    
    HTTP/1.1 404 Not Found
    Content-Type: application/json; charset=UTF-8
    Date: Mon, 05 Jan 2015 16:20:24 GMT
    Expires: Mon, 05 Jan 2015 16:20:24 GMT
    Cache-Control: private, max-age=0
    Content-Length: 165
    
    {
     "error": {
      "errors": [
       {
        "domain": "global",
        "reason": "notFound",
        "message": "Not Found"
       }
      ],
      "code": 404,
      "message": "Not Found"
     }
    }
    
    --batch_z-oHPbZ58LY_ABCtXOftAVw--
    Plugin Author Poco

    (@poco)

    @oaza.mnisek

    I understand what you are saying, but I do not believe this to be true (given how many calendars I have and have seen that are from normal http pages working correctly.

    There is no restriction that you must download the api script through the secure URL. I believe that it does redirect you to the secure version (so I could make the script just download the secure version by default) but this is not necessary for most (all) other users.

    https://apis.google.com/js/client.js

    Since it does redirect I might as well just make it use https by default, but this shouldn’t impact your page.

    Ok. I am having the same clocking wheel as some of the others. Perhaps I am not as technical as some, because I couldn’t get it to work.

    1. I created and Saved the API Key.
    2. I changed my Calendar ID 1 in the Widget from https://www.google.com/calendar/feeds/jbxxxx%40gmail.com/public/full to just the Calendar ID displayed next to the address in settings [email protected].

    I also tried:
    1. Changing Calendar ID 1 to the XML url in calendar settings.

    Neither worked.

    The website is https://www.jbcchurch.org

    Thanks for your help.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Spinning wheel – no calendar data displayed’ is closed to new replies.