ynorth-projects / openy_repeat

Decouple openy_repeat.
1 stars 17 forks source link

Incorrect calendar download if filtered by location #50

Open andriokha opened 5 months ago

andriokha commented 5 months ago

Hi, thanks for the hard work on this module!

We had a user tell us that they tried downloading a particular event for their calendar, but the downloaded file referenced a different event. After some trial and error I was able to reproduce it by filtering on location without reloading the page. Just to check whether it was an issue local to our site I tried to see if I could reproduce it on the Greensboro site, and I could.

Repro

  1. Go to https://www.ymcagreensboro.org/open-gym-and-pool?date=2024-06-03&locations=&categories=&cn=
  2. Go down the list to 5am Open Gym, Eden Family YMCA and click Add To Calendar.
  3. Copy the ICalendar link: it should be https://addtocalendar.com/atc/ical?utz=60&uln=en-US&vjs=1.5&e[0][date_start]=2024-06-3%2005%3A00%3A00&e[0][date_end]=2024-06-3%2020%3A00%3A00&e[0][timezone]=America%2FNew_York&e[0][title]=Open%20Gym&e[0][description]=&e[0][location]=&e[0][organizer]= (note the title is Open%20Gym)
  4. Now use the location filter on the left to filter by Eden Family YMCA.
  5. Next to 5am Open Gym, Eden Family YMCA click Add To Calendar.
  6. Copy the ICalendar link.

Expected result

It should be the same calendar link

Actual result

https://addtocalendar.com/atc/ical?utz=60&uln=en-US&vjs=1.5&e[0][date_start]=2024-06-3%2005%3A00%3A00&e[0][date_end]=2024-06-3%2015%3A00%3A00&e[0][timezone]=America%2FNew_York&e[0][title]=Pickleball&e[0][description]=&e[0][location]=&e[0][organizer]= (note the title is Pickeball)

It looks like that's the link to the first item when you first loaded the page (ie before applying the filter). If you reload the page with the filter it works fine.