ical importer Google Calendar sync

Home Forums Calendar Products Event Aggregator ical importer Google Calendar sync

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1164536
    Edward Comarzan
    Participant

    I recently purchased the ical importer to do recurring syncing with a few dozen Google Calendars that a local church has setup,(they have google apps for non-profit) but I am getting errors trying to add the private ical address of the calendar. A little background info:

    I created a google calendar and imported some events to it using a .csv file (on the google calendar end). All my events show up fine, no problem with the google calendar. I’ve also made the calendar public. When I copy the private ical address of the calendar and use it in the “New iCal Import” form, I get the error “No iCal data was found at this URL.”

    After reading some threads here, I tried to follow the guide to troubleshoot. I setup a clean virgin wordpress locally with the twenty fourteen theme and no other plugins enabled except for the event calendar and the ical import plugin, change the license my local development, registered it and verified it shows up correctly under my license keys.

    The ical URL in question is: https://calendar.google.com/calendar/ical/stjohnparish.org_4gimn150grk0jdrtl9hcd32a4g%40group.calendar.google.com/private-759607577693e27f10007c0802044a99/basic.ics

    When I import my personal ics url from google, it works fine. It seems to not like any of the calendars from the churches account. Has anyone experienced this before? Did I miss something in the threads?

    Any help is greatly appreciated.

    Thanks!

    #1164548
    Cliff
    Member

    Hi Edward.

    Thanks for your detailed question.

    I experienced the same for that URL on my local testing site.

    However, I downloaded the .ics file to my hard drive, then uploaded it to the iCal Importer (.ics option instead of URL option) and it worked: https://cl.ly/1o3v0D3e0s0y

    Therefore, I believe this has something to do with that calendar URL not wanting to be accessed by our iCal Importer (i.e. by your or my website). I thought we had a similar issue because it is like a headerless browser (this could be way off but it’s the phrase I’m remembering for some reason), but I couldn’t find it in my searching.

    I’ll run this past one of our developers and get back to you soon.

    Thank you!

    #1164728
    Cliff
    Member

    Ok, here’s the developer update:

    If you download that ical file yourself, you’ll see BEGIN:VCALENDAR at the top.

    The iCal Importer parser expects that to be there; it cannot work without it.

    If WordPress fetches the feed, then that initial line is missing. You can replicate the same with wp_remote_get(). This is likely this bug in WordPress itself: wp_remote_get sometimes mutilates the response body

    Since it’s a bug with WordPress itself — or with Google Calendar not including that text I mentioned — it’s not something we have control over to fix.

    Also, our iCal Importer will be replaced by Event Aggregator in the very near future. I tested the beta version of Events Aggregator with this iCal URL and got the error message, “The URL provided did not have events in the proper format.”

    Events Aggregator does have much more helpful messaging to help you figure out what’s actually going on, just like in this case.

    Again, since it’s an issue with WordPress 4.6, there’s not much more I can assist with here other than pointing you back to https://core.trac.wordpress.org/ticket/37839

    #1165089
    Edward Comarzan
    Participant

    Cliff,

    Thanks for the assistance! The developers notes really helped me out. I was able to tweak the plugin slightly for my needs to get it going until the issue is resolved fully with the wordpress bug. I am looking forward to trying out Event Aggregator when it comes out!

    If anyone else is having trouble, here is what helped me:

    In Feed_Parser.php around line 200, I stuck in a quick test right BEFORE $calendar = $this->parse( $content ); :

    
    if (0 !== strpos($content, 'BEGIN:VCALENDAR')) { $content = 'BEGIN:VCALENDAR \n'.$content; }
    

    That just adds the string to the beginning if its not there.

    ** NOTE: This is not the best practice of resolving the problem, this is more of a temporary fix **

    Cliff, thanks again! It wouldn’t of been possible without your developer and your help.

    #1165258
    Cliff
    Member

    You bet! Thanks for sharing what you chose for your solution. Have a great weekend.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘ical importer Google Calendar sync’ is closed to new replies.