Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

why won't iCal import an event that has all three of the following; a start time, end time, and duration even if they are all correct?

When I receive an email with an event attached from one particular buisness it always fails to import automatically. If I grab the event from downloads and drag and drop it onto iCal or simply double click on it the import popup opend and stays 'importing' without ever importing. Usually I'll just have to force quit iCal (I am unsure if it would ever time-out).


I've played around and found that if I delete the end time leaving start and duration it imports flawlessly. Also if I remove duration leaving start and end times it also imports without issue. Is it the CalDAV standard that is tripping things up? Is there any workaround I can try so that these items go into iCal without issue?


Everything I'm using is up-to-date iCal (5.0.2), OS X 10.7.3 etc.

MacBook Pro (17-inch Mid 2010), Mac OS X (10.7.3)

Posted on Apr 9, 2012 9:09 AM

Reply
6 replies

Apr 9, 2012 9:26 AM in response to blender50

Here is an example of the event that doesn't import:


BEGIN:VCALENDAR

PRODID:-//Sesame Communication//Appt. Reminder//EN

VERSION:2.0

CALSCALE:GREGORIAN

METHOD:PUBLISH

BEGIN:VEVENT

DTSTART:20120411T170000Z

DURATION:P30M

DTEND:20120411T173000Z

LOCATION:EDH

TRANSP:OPAQUE

SEQUENCE:0

UID:20120411T170000Z-20120411T173000Z@sesamecommunactions.com

DTSTAMP:20120409T162025Z

DESCRIPTION:You are scheduled to see Mr. John Doe on Apr 11, 2012 at 10:00 AM.

SUMMARY:Mr. Doe is looking forward to seeing you!

CLASS:PUBLIC

BEGIN:VALARM

ACTION:DISPLAY

TRIGGER:-P1D

REPEAT:2

DURATION:P1D

DESCRIPTION:Reminder

END:VALARM

END:VEVENT

END:VCALENDAR


If I open this in a text editor and remove either the 'DURATION' or 'DTEND' parameters it imports without issue.


Does having all of; DTSTART, SURATION, and DTEND violate some standard in CalDAV even if the values for each 'make sense'?

Apr 9, 2012 3:48 PM in response to Austin Kinsella1

Try this script. Open it with Script Editor, then save it as an application to the Desktop. When one of the baddies comes in, drag it from Mail and drop it on the script.


*****************************

(* AK April 2012

** take ics file dropped from mail attachment

** save it to sesame2.ics on desktop

** if it has both duration and end only one will be written to file

** after saving tell iCal to read it

** will not work if multiple events in attachment

** all sorts of other problems could stop it working!

*)

on openicsFile

set TheList to readicsFile

set icsName to ((path to desktop) as string) & "sesame2.ics"

set NewICSFile to open for accessicsName with write permission

set EventBits to paragraphs of TheList

set ABit to item 1 of EventBits

repeat until ABit starts with "BEGIN:VEVENT"


writeABit & returntoNewICSFile

set EventBits to rest of EventBits

set ABit to item 1 of EventBits

end repeat


writeABit & returntoNewICSFile

set EventBits to rest of EventBits

set ABit to item 1 of EventBits--at start of event

set BadBits to {} --hold end or duration or both

repeat until ABit starts with "END:VEVENT" --process the event

if (ABit starts with "DTEND") or (ABit starts with "DURATION") then

set BadBits to BadBits & ABit

else if ABit starts with "BEGIN:VALARM" then

repeat until ABit starts with "END:VALARM"


writeABit & returntoNewICSFile

set EventBits to rest of EventBits

set ABit to item 1 of EventBits

end repeat


writeABit & returntoNewICSFile


-- set EventBits to rest of EventBits


-- set ABit to item 1 of EventBits

else


writeABit & returntoNewICSFile

end if

set EventBits to rest of EventBits

set ABit to item 1 of EventBits

end repeat


write (item 1 of BadBits) & returntoNewICSFile

repeat with ABit in EventBits--event end, dump rest to file


writeABit & returntoNewICSFile

end repeat


close accessNewICSFile

tell application "iCal"


openicsName

end tell

end open

*************************

why won't iCal import an event that has all three of the following; a start time, end time, and duration even if they are all correct?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.