I have come across an issue where the line endings "\r\n" are remaining in the parsed RRULE. This is happening somewhere inside iCalCreator. I have a workaround that stringreplaces both ""\r\n" and a space " " in the ParseVcalendar.inc file, before the RRULE is returned. This is not an ideal solution but seems to work for my purposes.

This issue only occurs for events that are set to repeat monthly on a specific day, the second Tuesday of every month for example.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maniosullivan created an issue. See original summary.

maniosullivan’s picture

coredumperror’s picture

Huh, odd. Considering that the $rrule is coming out of iCalcreator, I wonder which version you have installed? I've never seen this happen before, so it may be a bug that you can fix by updating iCalcreator to the newest supported version (v2.20.2).

If that doesn't work, could you provide an example .ics file that triggers this problem? I may be able to find a less brute-force solution if I can replicate this behavior on my dev machine.

maniosullivan’s picture

My solution is in no way elegant, but it seemed cleaner than hacking the iCalcreator library. The iCalcreator version is definitely v2.20.2.

You can get the ics at the publicly available endpoint: http://events.dlrcoco.ie/library-events.ical

I have validadted the ics and the online validation tools I have used do not show any issues with the format. Let me know if you need any more info.

coredumperror’s picture

Ah HA! I see the problem now, and yeah this is a bug in iCalcreator. You're having a problem with the BYMONTH and BYDAY RRULEs specifically because they're the only ones long enough to require a linebreak. And iCalcreator is apparently not coded to cut out said linebreak.

I've updated your patch to be a bit more elegant, and pushed it up to git. It'll show up in the newest dev build soon.

maniosullivan’s picture

Awesome!

Thanks for taking this change on board.

I wonder if the newer versions of iCalcreator have resolved this issue?

coredumperror’s picture

They may have done so, unfortunately, they're incompatible with Date iCal. I tried updating Date iCal to be compatible with the newer version a few months back, but the changes the author made to iCalcreator were too extensive, and would require a significant re-write of Date iCal's feed parser code to make it work. I just don't have the time for it, and iCalcreator 2.20.2 is good enough.