Support » Plugin: amr ical events lists » unable to load calendar

  • Resolved servicemax

    (@servicemax)


    Hi,
    I had this working on an older website but I must be missing something now.
    Tested on wp 4.9 & 5.2
    PHP 7.2
    AMR iCal Events list v5.7
    using one internal and one external WP install
    calendars validate ok (using tools you mention) and can be used in Thunderbird

    Issue- calendars events do not display, best error I can get is ‘Unable to load or cache ical calendar’
    debug does not appear to work. I have used both the public calendar above, and this one which I have created some test events in
    http://www.google.com/calendar/ical/0bajvp6gevochc6mtodvqcg9o0%40group.calendar.google.com/public/basic.ics

    Honestly I’d just like a thorough set of instructions to get a single public calendar to display on a webpage- I think that would help a lot*. I can probably take it from there.

    Thanks in advance
    Adam

    *yes there are simple instructions, but I’ve been over them many times so I guess I’m just frustrated that they haven’t worked for me!

    • This topic was modified 3 months ago by  servicemax.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author anmari

    (@anmari)

    HI,

    YOur ics url works just fine on my test system so it is not it perse, but how you have specified it, or your system, neither of which I can see.

    I agree https://wordpress.org/plugins/amr-ical-events-list/#installation is probably a bit long winded. The simplest instructions would be:

    add a shortcode to a page like this:

    [iCal yoururl.ics]

    And of course as per the instructions under the list of shortcodes in the installation page, please check that you don’t have a href link instead of a clean url: IE NOT:
    [iCal <a href="htt...yoururl.isc>yourirl.ics</a>]

    You may find it easier to use the classic editor text view do this.

    If you are using the block editor, please ensure that you clicked ‘add shortcode’ and didn’t just type the shortcode into the page. If you just type, WP converts the url into a clickable link.

    • This reply was modified 3 months ago by  anmari.
    • This reply was modified 3 months ago by  anmari.
    • This reply was modified 3 months ago by  anmari.
    servicemax

    (@servicemax)

    thanks for the reply, and thanks for checking the link.

    Were you testing the Google one or the other one I supplied?

    If the problem is at my end, how do I diagnose please?
    Are there logs anywhere?

    I’ve done just about everything on the troubleshooting page.
    When I find the answer I’ll be sure to report back, thanks again

    Plugin Author anmari

    (@anmari)

    They are both google calendars and yes they both work.
    Did you see the double exclamation marks with link above the “Unable to load message”? Hover over that.
    The plugin will tell you all it knows there and in a html source comment.

    You may also want to check that your new server allows php to fetch external files.

    Hi Anmari,
    Once again thank you for your help.
    I do feel like I’m going crazy – I must be missing something basic.
    I’ve checked and ‘allow_url_fopen’ is turned on for both servers in php

    Yet I still can’t get a single event to display on either website.

    I’ve created a test Google Calendar with a couple of events, here is the url-
    https://calendar.google.com/calendar/ical/eft3a0t7v5l4hqaeudc3r2sln4%40group.calendar.google.com/public/basic.ics
    here is the public URL of the test calendar
    https://calendar.google.com/calendar/embed?src=eft3a0t7v5l4hqaeudc3r2sln4%40group.calendar.google.com&ctz=Australia%2FSydney

    I’ve created a new page on a site, gone to the code section and pasted this-
    [ical https://calendar.google.com/calendar/ical/eft3a0t7v5l4hqaeudc3r2sln4%40group.calendar.google.com/public/basic.ics%5D

    post, save and go to the page which is at
    http://adamsarah.com/?page_id=36

    and… nothing.

    Please let me know if you see anything wrong here, or let me know how I can diagnose further, thank you.

    just to be clear- there is a close bracket on my code pasted into the test site- don’t know why it is missing here…

    Plugin Author anmari

    (@anmari)

    Please check your log files. When I do a view source on your page, I see that your system has stopped producing html after the title, before the output of the shortcode, IE it appears to totally die then.

    try also turning https://codex.wordpress.org/WP_DEBUG on, so you can see if there are any messages.

    • This reply was modified 2 months, 1 week ago by  anmari.
    servicemax

    (@servicemax)

    Hi Anmari,
    Thanks for that very useful suggestion. After turning on wp-debug, here is the error I got-

    Fatal error: Uncaught Error: Call to undefined function gregoriantojd() in /home/adamsara/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php:476 Stack trace: #0 /home/adamsara/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php(514): amr_daysDifference(Object(DateTime), Object(DateTime)) #1 /home/adamsara/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php(652): amr_calc_duration(Object(DateTime), Object(DateTime)) #2 /home/adamsara/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php(1455): amr_derive_dates(Array) #3 /home/adamsara/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php(1702): amr_process_icalevents(Array, Object(DateTime), Object(DateTime), 30) #4 /home/adamsara/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php(2218): amr_process_icalspec(Array, Object(DateTime), Object(DateT in /home/adamsara/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php on line 476

    So I guess it’s having trouble with the way my time is set up?

    servicemax

    (@servicemax)

    Error message revealed that the plugin was calling ‘gregoriantojd()’ which is a function of a PHP extension called ‘Calendar’
    A bunch of sites claim that this is enabled by default, and perhaps it is in PHP 5.6 but it wasn’t on my 2 test sites using PHP 7.1
    – one was cpanel based, and the other was WordPress on Synology

    For cpanel the fix was to go to WHM and use EasyApache to recompile with the Calendar extension included.
    https://www.php.net/manual/en/book.calendar.php
    For Synology you need to edit .htaccess to enable switching PHP versions
    https://servicemax.com.au/news/synology-wordpress-php-configuration/
    then you need to click the checkbox to enable the Calendar extension in your chosen PHP version
    https://mariushosting.com/synology-php-7-2-settings-and-extensions-for-wordpress/

    Can you please list this as a requirement of your plugin to save time in troubleshooting.

    servicemax

    (@servicemax)

    hmm, still having issues. With a Google calendar link AMR iCal Events says ‘unexpected data’ and sure enough using Curl there seems to be a redirect.

    With a ‘Webcal’ link AMR iCal Events says ‘No cached events. No route to host. Unable to download via HTPP or Curl’
    (assume this should say ‘HTTP’)
    as follows-
    No cached ical file for events<br />No route to host</br> Error getting calendar file with htpp or curl http://p01-calendarws.icloud.com/ca/subscribe/1/redacted“>!<br>Unable to load or cache ical calendar webcal://p01-calendarws.icloud.com/ca/subscribe/1/redacted<div id=”events_wrap” ></div>

    Updating to say this appears to have fixed itself. One day I looked at the display and the test calendar was working, so I added the others and they worked too.
    Mysterious…

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.