add-to-calendar-buttons icon indicating copy to clipboard operation
add-to-calendar-buttons copied to clipboard

Bug fix - generateCalendars() is called without an event.id

Open shaal opened this issue 5 years ago • 1 comments

When I use Download ical button, on a page that has multiple "add to calendar" widgets, the UID that is being generated is UID:-https://www.mywebsite.com So all the events on that page - will have the same UID, and that is causing each ics download to override the previous events that were added to my calendar.

When I examined this, I found out that generateCalendars() was called without an event.id

This PR fixing that issue, and now the UID includes the random ID added before the url - UID:624696-https://www.mywebsite.com

shaal avatar Sep 29 '20 14:09 shaal

I'd suggest adding this to sanitizeParams instead, in the if statement that sets params.options.id if it is not set. Then the event object will have an id param. As originally designed I'm not even sure why the id gets added to params.options instead of the params.data object.

params.data.id = params.options.id;

jruns avatar Nov 10 '20 15:11 jruns