Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shaal
Copy link

@shaal shaal commented Sep 29, 2020

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

@jruns
Copy link

jruns commented Nov 10, 2020

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants