Page 1 of 1

Debugging Google Sync

Posted: Wed Nov 02, 2011 1:00 am
by jwinkel
Unfortunately I am unable to sync to Google calendars. After reading thisthread and using the iCal validator, I found a number of "invalid" entries that apparently don't allow the validator (and, apparently, Google) to parse the file. I couldn't see anything obviously wrong with any of the entries, but I know absolutely nothing about iCal files.

My hope is that someone who knows what they're doing can spot the issue and let everyone know. Then I can communicate with others in the Stake to have them avoid whatever mistakes are causing this issue. That, or perhaps the calendar developers can recognize an easy fix on their end? Again, none of these seem in the least bit incorrect or odd:

PRODID:-//Church of Jesus Christ of Latter Day Saints//LDS Calendar 2.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTAMP:20111101T220412Z
DTSTART:20111202T020000Z
DTEND:20111202T030000Z
SUMMARY:Scout Roundtable Meeting
UID:000000000000000000000000000000000000001391455@calendarws.lds.org
DESCRIPTION:Who should attend roundtable:

Stake Young Men Presidency
Stake Primary Presidency over Cub Scouts
Stake Primary Presidency over 11 year old scouts
High councilor over scouting
High councilor over Cub Scouts
Bishopric member over Scouting and Primary
Ward Young Men Presidency
Ward Primary Presidency over Cub Scouts
Ward Primary Presidency over 11 years old scouts
Varsity Coach
Assistant Varsity Coach
Varsity Committee members
Scoutmaster
Assistant Scout Master
11 Year old Scout leader
Scout Committee members
Cub Master
Den leaders
Webelos leaders
Pack Committee members
END:VEVENT
END:VCALENDAR

PRODID:-//Church of Jesus Christ of Latter Day Saints//LDS Calendar 2.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
SUMMARY:Regional Youth Dance @ CSN
UID:000000000000000000000000000000000000000369134@calendarws.lds.org
DESCRIPTION:Per Regional YM/YW Committee Mtg 9/7/10

posted 10/10/10 neo
END:VEVENT
END:VCALENDAR

PRODID:-//Church of Jesus Christ of Latter Day Saints//LDS Calendar 2.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTAMP:20111101T220412Z
DTSTART:20111008T140000Z
DTEND:20111008T150000Z
SUMMARY:Mini-Philmont Scout Training CSES
UID:000000000000000000000000000000000000000368491@calendarws.lds.org
DESCRIPTION:Per Regional YM/YW Committee Mtg 9/7/10

test 10/10/10 neo
END:VEVENT
END:VCALENDAR

PRODID:-//Church of Jesus Christ of Latter Day Saints//LDS Calendar 2.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTAMP:20111101T220412Z
DTSTART;VALUE=DATE;VALUE=DATE:20111126
DTEND;VALUE=DATE;VALUE=DATE:20111127
SUMMARY:Stake Temple Morning (click to view times and assignments)
UID:000000000000000000000000000000000000000370821@calendarws.lds.org
DESCRIPTION:ENDOWMENTS (20 people per session)
8:00 a.m. 3rd Ward
8:30 a.m. 5th Ward
9:00 a.m. 8th Ward
9:30 a.m. 16th Ward
10:00 a.m. 17th Ward
10:30 a.m. 18th Ward
11:00 a.m. FW Ward
11:30 a.m. Mesa Ward
12:00 p.m. SC Ward


LAUNDRY/DINING 2 people laundry/3 people dining)
8:00 a.m. - 12:00 p.m. 8th Ward
12:00 p.m. - 4:00 p.m. 16th Ward
END:VEVENT
END:VCALENDAR


Looking at it now, I'm wondering if line breaks are the issue (they didn't show up in Notepad). Is there a way people are supposed to enter line breaks, or are they essentially not allowed? That may be difficult to communicate and explain to people . . .

Thank you!

Posted: Wed Nov 02, 2011 2:40 am
by russellhltn
From Wikipedia:
Each line is terminated by CR+LF (in hexadecimal: 0D0A). Lines should be limited to 75 octets (not characters) long. Where a data item is too long to fit on a single line it can be continued on following lines by starting the continuation lines with a space character (in hex: 20) or a tab character (in hex: 09).

Actual line feeds in data items are encoded as a backslash followed by the letter N (the bytes 5C 6E or 5C 4E in UTF-8). iCalendar data has the MIME content type text/calendar.
Based on that, yeah, I think it's the line breaks in the Description that's doing it.

Posted: Wed Nov 02, 2011 9:40 am
by jwinkel
Thank you for the help! Oddly enough, when the events are opened ("View Event"), the description doesn't have a line break. The events with lists show every line run together - so the breaks aren't even being taken into account in that screen!

It's going to be hard to ask people to not have more than one paragraph or to not press Enter when entering the description on these events. Is there a way around it?

Quick note: I found an event with "\n" preceding what could be a new paragraph - though the line break doesn't show up in the "Vew Event" screen. Does this mean that a line break is supposed to be translated to "\n" in the code when a user is entering it? So maybe the code just got screwy somewhere for these other events?

Posted: Wed Nov 02, 2011 10:00 am
by aebrown
jwinkel wrote:Quick note: I found an event with "\n" preceding what could be a new paragraph - though the line break doesn't show up in the "Vew Event" screen. Does this mean that a line break is supposed to be translated to "\n" in the code when a user is entering it? So maybe the code just got screwy somewhere for these other events?

The line breaks should be stored as \n (or at least be converted to \n when the iCal feed is generated) -- it isn't anything your users should have to worry about as they enter descriptions. So the question is how these descriptions got into the system in the first place. I suspect it was some kind of import that didn't work quite right -- either an import of data from the classic calendar, or the recent data migration (although if it were the latter case, I would have expected many more people to be reporting the problem).

Posted: Wed Nov 02, 2011 5:47 pm
by jwinkel
Thank you for the help! I'll ask our Stake Exec Secretary to delete and reenter the offending entries. Again, I appreciate the help! Thank you!

We're seeing this problem too

Posted: Tue Feb 28, 2012 8:53 am
by antoneroundy
There's one repeating event in our stake calendar that has line breaks which aren't being translated to \n. Based on the name of the contact person, I suspect the event may have been entered in the old calendar, and the line breaks simply weren't fixed by the system during import. It might save some hair pulling if someone could do a global search and replace to fix any such lingering problems.