This topic is: not resolved

Save to iCal bugs

  • Sam
    Participant
    Post count: 4
    # 4 weeks, 1 day ago

    Hi. When using the Save Event function to export to Apple Calendar (Mac or iOS), there are multiple problems:

    • The date does not span multiple days if the event is multi-day
    • There is HTML in the description
    • There is no location

    I have fixed the code in the eventer_save_events function in front_functions.php to fix all these problems. Here is the code: https://gist.github.com/samrae/87f43ef1e98a16b7d4199e6157794550

    With this code:

    • Multi-day event dates are passed correctly.
    • HTML is removed from the description, and the text is formatted to reflect the structure of the original HTML.
    • The location is passed correctly.

    I have only modified the code for iCal and code that is common to all the options. I don’t know if code for other options (Google Calendar, Outlook, etc.) needs updating as well.

    I also don’t know why there’s a space at the start of each line in the description.

    I’ve submitted a ticket with this same content. Adding it here so that others might benefit if it’s useful for them.

    Sam
    Participant
    Post count: 4
    # 4 weeks ago

    Added:

    – Now checks for an excerpt. If an excerpt exists, that will be the description in the .ics file. If not, the content field is used (and cleaned up).
    – Permalink to the post now passed into the .ics (for iCalendar only—I can’t test the others)

    Known issues:

    – When using an excerpt for the Description, the Description ends up having no line breaks. I’m not sure why this is.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.