CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Google Calendar won't accept CiviEvent iCal feed
Pages: [1] 2

Author Topic: Google Calendar won't accept CiviEvent iCal feed  (Read 8703 times)

samarkand

  • Guest
Google Calendar won't accept CiviEvent iCal feed
March 02, 2009, 05:06:33 pm
I copied the iCal feed from the main CiviEvent page and attempted to add it to Google Calendar as "a friend's calendar" by URL. Google Calendar came back with: "The address that you provided did not contain a calendar in a valid iCal or GData format."

I've checked the feed, and it can indeed be read anonymously, so I'm not sure what's going on. No attempt can be made to recreate this issue on the CiviCRM Demo, because that feed cannot be anonymously accessed, and I can't change that permission.

Someone else reported the same problem here:
http://forum.civicrm.org/index.php/topic,6292.msg27741.html#msg27741

(The user went on to file a related issue, but the Google Calendar problem seems to have gone unaddressed.)

Thanks.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Google Calendar won't accept CiviEvent iCal feed
March 03, 2009, 08:20:08 am
Quote
I copied the iCal feed from the main CiviEvent page and attempted to add it to Google Calendar as "a friend's calendar" by URL. Google Calendar came back with: "The address that you provided did not contain a calendar in a valid iCal or GData format."
Add Friend's calendar expects valid email address not an url. I guess you will have to use Add By URL.

Quote
I've checked the feed, and it can indeed be read anonymously, so I'm not sure what's going on. No attempt can be made to recreate this issue on the CiviCRM Demo, because that feed cannot be anonymously accessed, and I can't change that permission.
Fixed permissions on demo.
http://drupal.demo.civicrm.org/civicrm/event/ical?reset=1&page=1

Kurund

Found this reply helpful? Support CiviCRM

samarkand

  • Guest
Re: Google Calendar won't accept CiviEvent iCal feed
March 03, 2009, 01:27:02 pm
Yes, I am using "Add by URL" when attempting to add a calendar to Google Calendar. (I thought that this was a sub-selection of "Add a friend's calendar," but I see now that it is its own selection.)

Kurund, thank you for attempting to fix the demo permissions, but they do not appear to have changed. When I try to browse the feed, I get an "Access denied" page. Hence, adding the CiviCRM demo calendar to Google results in the familiar message: "The address that you provided did not contain a calendar in a valid iCal or GData format."

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Google Calendar won't accept CiviEvent iCal feed
March 03, 2009, 04:40:50 pm

demo permissions are now fixed. i just tried it as anon and the ical page worked fine

when we last tried, we could import the ical feed into google calendar.

However we were not successful in getting the "add by url" to work. We spent a fair amount of time on it and did not succeed. If you'd like to sponsor more investigation into this, do contact us (we suspect it will take at least 10-20 hours, we've already spent that much time if not more on it). If you have the developer skills to make progress on this that would be great

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

samarkand

  • Guest
Re: Google Calendar won't accept CiviEvent iCal feed
March 04, 2009, 06:08:06 pm
Okay, I see now that importing iCal as a file works (and adding an iCal feed by URL doesn't). Thanks.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Google Calendar won't accept CiviEvent iCal feed
March 04, 2009, 09:46:41 pm
I believe this may be the reason http://issues.civicrm.org/jira/browse/CRM-4201

Quick test seems to indicate it but can't test properly right now (would make sense too that a feed would need a date stamp
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Google Calendar won't accept CiviEvent iCal feed
March 05, 2009, 05:43:29 pm
Hi,

Just posting that I think I have a fix for this - but just testing. Should be more in a day or so
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Google Calendar won't accept CiviEvent iCal feed
March 06, 2009, 05:21:08 am
OK - a day or two won't cut it. I know the cause of this error "The address that you provided did not contain a calendar in a valid iCal or GData format." but there's still something buggy. I'm testing it but I have to wait half a day between changes for google to update to check whether each change has broken it. (and no, you don't seem to be able to make google update any quicker at this stage)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

samarkand

  • Guest
Re: Google Calendar won't accept CiviEvent iCal feed
March 09, 2009, 04:28:45 pm
Eileen, thank you very much for checking the functionality with Google Calendar.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Google Calendar won't accept CiviEvent iCal feed
March 09, 2009, 05:54:07 pm
I know the problem - its' to do with the fact it needs to be mime encoded if delivered by http. I grabbed some code for mime encryption of the net & stuck it in & it fixed the original problem but there is one (or more) fields or characters it still doesn't like so I've been adding & removing fields but caught out by the length of time google takes to update itself
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

marqpdx

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
Re: Google Calendar won't accept CiviEvent iCal feed
June 05, 2009, 02:28:10 pm
hi Eileen, do you know if this mime deal has been fixed, so one can use the ical feed in a google calendar?
thanks!!
best,
m

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Google Calendar won't accept CiviEvent iCal feed
June 05, 2009, 03:14:40 pm
(I did notice that when I updated a couple of events to change the text of the event name / summary, the iCal feed didn't reflect those changes straight away. It seemed like the details were cached, or that the details didn't get updated in the iCal feed.)

I wonder if this issue is only triggered when an iCal feed has non-ASCII characters in it, which is when the MIME encoding would become a requirement?

This iCal validator says the CiviCRM demo iCal validates, even with random unicode chars in it. But maybe this validator is looser than Google's validator.

There's also a Drupal discussion of a similar issue.

Eileen, I'm not sure what you're using to encode the feed, but there are some MIME encoding functions in packages/Mail/mimePart.php which you could use.
@xurizaemon ● www.fuzion.co.nz

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Google Calendar won't accept CiviEvent iCal feed
June 05, 2009, 03:16:58 pm
Hi,

The caching issue stymied me. It was taking so long for my changes to be picked up I couldn't tell when I had it right. There was talk on google about enabling you to trigger it to update rather than using cache and I thought I'd wait & see if that eventuated
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

marqpdx

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
Re: Google Calendar won't accept CiviEvent iCal feed
June 05, 2009, 03:31:08 pm
hi Eileen,
how long a delay were you seeing for updates to move through to the calendar?? hours? days? (what seemed like) centuries???
thanks!
:-)
m

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Google Calendar won't accept CiviEvent iCal feed
June 05, 2009, 04:44:14 pm
Quote from: Eileen on June 05, 2009, 03:16:58 pm
The caching issue stymied me. It was taking so long for my changes to be picked up I couldn't tell when I had it right. There was talk on google about enabling you to trigger it to update rather than using cache and I thought I'd wait & see if that eventuated

So both Google and CiviCRM are caching the feed? I see the latter, didn't test much with the former. Ouch.

But at Google's end, at least you can presumably add a "new" feed with a URL of "&nocache=1" (2,3,...)

(It may even be that the iCal feed accepts a param to rebuild CiviCRM's cached copy, presuming that's what's happening.)

From a look back at the ical feed on demo.civicrm.org, it seems that CiviCRM has updated the iCal feed when a new event is added. So you could use that as an alternate method to rebuild the iCal feed, if there's no builtin method which triggers the feed updating when an event is updated. (Suggestion: event updates should trigger rebuild of iCal caches.)

PS. I've never actually seen a caching mechanism in CiviCRM for iCal feeds, nor gone looking for one, so it may be that the caching behaviour we're seeing is not intentional ;)
« Last Edit: June 05, 2009, 04:49:54 pm by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Google Calendar won't accept CiviEvent iCal feed

This forum was archived on 2017-11-26.