Overview
When clicking “Add to calendar” in the event preview modal (the one that appears after clicking on the event’s date), the downloaded .ics file is named undefined.ics and the event title inside the calendar file is also set to SUMMARY:undefined. However, downloading the calendar via the “Add to calendar” option from the event’s 3-dot menu works as expected, using the event’s title for both the filename and the calendar summary.
Steps to reproduce
-
Create or open a topic with an event
-
Click on the event date shown in the post to expand the preview modal:
-
In the modal, click on Add to calendar
-
Save the generated
.icsfile. -
Optionally, compare by clicking on the event’s 3-dot menu and using Add to calendar from there
Expected results
- The downloaded
.icsfile should be named after the event’s title - The calendar file content should have a correct
SUMMARY:with the event title
Observed results
- The downloaded file is named
undefined.ics - The event title in the calendar file is
SUMMARY:undefined - (When downloaded from the 3-dot menu, both filename and summary are correct.)
Additional context
- Example of malformed ICS content:
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Discourse//EN BEGIN:VEVENT UID:1762794000000_1762801200000 DTSTAMP:20251105T173754Z DTSTART:20251110T170000Z DTEND:20251110T190000Z SUMMARY:undefined END:VEVENT END:VCALENDAR
Tested on Meta and several other Discourse sites, same result.
