This issue was reported in #1439058: Repeating events cause duplicates in iCal feeds for 7.x-1.0. It is still occurring in 7.x-2.x.

What happens is that events which have repeat rules are repeated as separate VEVENT entries in the feed but would also include the repeat rule (RRULE). This can result in events being duplicated when imported with each occurrence and included repeat rule. So for the first occurrence, the event is added once, on the second twice, and so on.

There are two ways to repair the issue and they were both discussed in #1439058: Repeating events cause duplicates in iCal feeds.
1) Remove the RRULE altogether and simply show each instance as an event repeats.
or
2) Grab the first date (delta = 0), show the RRULE and then unset the entity which would prevent the duplication.

I believe that 2 is a better options because it's semantically more correct and is more efficient to generate and parse.

Comments

vlad.pavlovic’s picture

Status: Active » Needs review
StatusFileSize
new901 bytes

Here is a patch that fixes the issue. It follows the same idea as #7 from #1439058: Repeating events cause duplicates in iCal feeds.

We show the first occurrence of the date and the repeat rule (RRULE) and then remove the entity. The difference is that we only remove the entity if there is an RRULE (so simple multi-day events are not affected).

If it's good to go, I will push it to dev.

vlad.pavlovic’s picture

Status: Needs review » Fixed

Pushed to dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.