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) »
  • Download iCalendar File error
Pages: [1]

Author Topic: Download iCalendar File error  (Read 7784 times)

joemaine

  • I post occasionally
  • **
  • Posts: 114
  • Karma: 3
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.2
Download iCalendar File error
September 26, 2008, 07:20:23 am
When attempting to "Download iCalendar File" from the link on a CiviEvent page the following error appears in Outlook...

Cannot import vCalendar file.
This error can appear if you have attempted to save a recurring Lunar appointment in iCalendar format. To avoid this error, set the appointment option to Gregorian instead of Lunar.

What should I be looking for to correct the error?

Drupal 6.4, CiviCRM 2.1
--
Joe

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: Download iCalendar File error
September 26, 2008, 11:37:50 am

your best bet will be to do a yahoo/google search and get more info on what outlook means by that message and how the ical field should be modified to meet outlook's expectations

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

joemaine

  • I post occasionally
  • **
  • Posts: 114
  • Karma: 3
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Download iCalendar File error
September 26, 2008, 11:44:49 am
I did do some digging around and Outlook is set up as Gregorian by default which makes me believe that CiviEvent is set to Lunar. I wondered if there was an option within CiviEvent to modify Gregorian/Lunar date format?
--
Joe

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: Download iCalendar File error
September 26, 2008, 11:48:49 am

you might want to take it to the next step, and see how the iCal feed needs to change to let outlook know its gregorian. i dont think we are aware/know those settings and what fields need to change etc

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

joemaine

  • I post occasionally
  • **
  • Posts: 114
  • Karma: 3
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Download iCalendar File error
September 26, 2008, 12:01:02 pm
A bit more digging and I found:
http://microformats.org/wiki/icalendar-implementations#Microsoft_Outlook_2003
and
http://microformats.org/discuss/mail/microformats-discuss/2006-July/004917.html

Apparently one potential solution is to change the version number from 2.0 to 1.0 in the feed that is generated in CiviEvent

Another bit of info is that UID and DTSTAMP are required for Outlook to import
--
Joe

joemaine

  • I post occasionally
  • **
  • Posts: 114
  • Karma: 3
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Download iCalendar File error
October 02, 2008, 11:26:16 am
Is there a way to change the version number or modify the fields to enable a solution?
--
Joe

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Download iCalendar File error
October 02, 2008, 05:11:23 pm
You can easily modify CiviEvent's iCal output by creating a custom copy of this template - and changing the version to 1 in your copy:
.. templates/CRM/Core/Calendar/ICal.tpl

That said, revisiting the 2.0 iCalendar standard (http://www.ietf.org/rfc/rfc2445.txt) I discovered what looks to be an inconsistency. In the VEVENT component section, the DTSTAMP property is listed as optional (Section 4.6.1). However, later in the document (4.8.7.2) :-( ...

Quote
Conformance: This property MUST be included in the "VEVENT", "VTODO",
   "VJOURNAL" or "VFREEBUSY" calendar components.

So I guess we should be including this property - which is supposed to be a UTC date-time on which the iCal output file was created (e.g. date( ) ).
I've added this to an existing 2.2 issue:

http://issues.civicrm.org/jira/browse/CRM-2711

If you can work up a patch for the existing code which meets Outlook's req's and works in other common iCalendar applications - or at least verify that you have a version of ICal.tpl that works with Outlook, that would be most helpful.

BTW - I figured out that you can add a current date-stamp in the tpl file using a smarty function (i.e. without modifying the associated PHP file to pass it in) - however I didn't find a way to make it UTC (GMT). For the purposes of trying things out, you can add this line into your custom tpl and it should spit out a local date-stamp. I've appended to 'Z' which is really not right - since that "means" this is UTC time - but might be needed for Outlook :-)

Code: [Select]
DTSTAMP:{$smarty.now|date_format:'%Y%m%d%H%M%S'}Z
« Last Edit: October 02, 2008, 05:35:25 pm by Dave Greenberg »
Protect your investment in CiviCRM by  becoming a Member!

joemaine

  • I post occasionally
  • **
  • Posts: 114
  • Karma: 3
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Download iCalendar File error
October 03, 2008, 01:24:05 pm
If the output is in either of the following formats - the ical can be loaded into Outlook2003 and Outlook2007:

--Version 1--
BEGIN:VCALENDAR
VERSION:2.0
PRODID:
METHOD:PUBLISH
BEGIN:VEVENT
UID:
SUMMARY:
DESCRIPTION:
CATEGORIES:
DTSTAMP:YYYYMMDDT155222
DTSTART;VALUE=DATE-TIME:
DTEND;VALUE=DATE-TIME:
LOCATION:
URL:
END:VEVENT
END:VCALENDAR

note that "METHOD:PUBLISH" is mandatory
note the "T" in the output for "DTSTAMP:" after the event date (YYYYMMDD)
_____________________________________
_____________________________________

--Version 2--
BEGIN:VCALENDAR
VERSION:1.0
PRODID:
METHOD:PUBLISH
BEGIN:VEVENT
UID:
SUMMARY:
DESCRIPTION:
CATEGORIES:
DTSTART;VALUE=DATE-TIME:
DTEND;VALUE=DATE-TIME:
LOCATION:
URL:
END:VEVENT
END:VCALENDAR

version changed to 1.0....not sure what is lost by deleting the "DTSTAMP:" line

there seems to be a missing space in the output between the address and city fields - in both versions.

Another question: what is the proper convention?
Should the download to the desktop application (Outlook/other) from the event page be:
 
"» Download iCalendar File" link
 
Or the
 
"ICAL" icon?
« Last Edit: October 03, 2008, 01:38:08 pm by joemaine »
--
Joe

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Download iCalendar File error
October 03, 2008, 01:57:41 pm
Quote from: joemaine on October 03, 2008, 01:24:05 pm
version changed to 1.0....not sure what is lost by deleting the "DTSTAMP:" line

DTSTAMP simply indicates the date-time that this ical feed or file was created - so it would only be useful to track "most recent version" of the events, to-do's etc. listings. We will include it in 2.2.

Quote from: joemaine on October 03, 2008, 01:24:05 pm
there seems to be a missing space in the output between the address and city fields - in both versions.

Not sure what you mean. In CiviEvent output? or ??

Quote from: joemaine on October 03, 2008, 01:24:05 pm
Another question: what is the proper convention?
Should the download to the desktop application (Outlook/other) from the event page be:
 
"» Download iCalendar File" link
 
Or the
 
"ICAL" icon?

The link and the icon do 2 different things. The "Download ..." link should tell the browser to download the data as an .ics file (which then can be imported into Outlook or Apple's iCalendar application etc.). The icon just sends the ical data directly to the browser (or any ical feed reader which accesses  that URL).
Protect your investment in CiviCRM by  becoming a Member!

joemaine

  • I post occasionally
  • **
  • Posts: 114
  • Karma: 3
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Download iCalendar File error
October 03, 2008, 02:11:24 pm
The display in the CiviEvent pages is correct, the space isn't picked up in the iCAL output. I can see the space in the raw ics file, but it gets lost when input into Outlook2003/2007. I'm not sure if a line break in the output is causing the error or if it's just an Outlook thing.

Thanks for the help!
--
Joe

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Download iCalendar File error

This forum was archived on 2017-11-26.