Reputation: 1
my iCalender script gives me an error Mismatched 'BEGIN' and 'END' (BEGIN:VCALENDAR , END:VCALENDAR). but it seems that it is correct.
below is my ical file script
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 14.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VEVENT
CLASS:PUBLIC
CREATED:20160617T000000Z
DESCRIPTION:Overview
DTEND;VALUE=DATE:20160621T000000Z
DTSTAMP:20160621T000000Z
DTSTART;VALUE=DATE:20160621T000000Z
LOCATION:Westin Galleria Houston, Texas
PRIORITY:5
SEQUENCE:0
SUMMARY;LANGUAGE=en-us:ABCD
TRANSP:TRANSPARENT UID:57639008a1a2d
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//E N">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html\; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server v ersion 14.03.0123.002">
<TITLE>ABCD</TI TLE>
</HEAD>
<BODY>
</BODY>
</HTML>
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MS-OLK-AUTOFILLLOCATION:FALSE
X-MS-OLK-CONFTYPE:0
BEGIN:VALARM
TRIGGER:-PT1080M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
iCalender validation report
Errors
Mismatched 'BEGIN' and 'END' (BEGIN:VCALENDAR , END:VCALENDAR) near line # 65 Missing VCALENDAR object near line # 1Reference: RFC 5545 3.4 iCalendar Object
Please help,
Upvotes: 0
Views: 2354
Reputation: 336
Sorry I am a little late here, but it looks like you used the icalendar validator at http://icalendar.org/validator.html. I am the author of that validator and after researching the issue I found a bug with the validator related to your feed. The bug was incorrectly including the blank space after the word "VCALENDAR" to determine the mismatch condition. There was a space after the "BEGIN:VCALENDAR " but not after "END:VCALENDAR", resulting in the incorrect validation error. White space at the end of the line is not an error, so this has been corrected. And you can try re-validating your feed again to see the updated results.
Upvotes: 1
Reputation: 6866
It may also be related to a bug in Exchange 2016:
If you have recurrent events and modify one of the instances, Exchange 2016 delivers invalid iCal data, i.e., the END:VCALENDAR
is missing.
See here for my bug report: https://social.technet.microsoft.com/Forums/office/en-US/9952d9ea-6040-46b8-93d7-f163c09acd70/bug-in-ews-invalid-ical-format-if-recurrent-event-modified?forum=exchangesvrdevelopment
Upvotes: 0
Reputation: 35341
The X-ALT-DESC property value is not folded correctly. Whenever a property value has multiple lines, each additional line must be prepended with one whitespace character, like so:
X-PROP:one
two
three
Also, your UID property is not on its own line.
Upvotes: 1
Reputation: 4775
your DTSTART
:
DTSTART;VALUE=DATE:20160621T000000Z
and your DTEND
:
DTEND;VALUE=DATE:20160621T000000Z
have the same values.
RFC5545 specifies
The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event.
which means that your event is not-defined. if you wish the even to last one day, just remove the DTEND
Also you specify a VALUE=DATE
but give a DATE-TIME
. Either change the property to VALUE=DATE-TIME
or change the value to be a date:
DTSTART;VALUE=DATE:20160621
Upvotes: 0