Title: ICal and ICS doesn&#8217;t work any longer
Last modified: September 19, 2024

---

# ICal and ICS doesn’t work any longer

 *  [mikeknappe](https://wordpress.org/support/users/mikeknappe/)
 * (@mikeknappe)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/ical-and-ics-doesnt-work-any-longer/)
 * Hi Joe,
 * since the last updates my ICal and ICS functions doesn’t work any longer. For
   example: If the API is enabled and I try to get data like the following it works:
   
   [https://domain.com?to=2024-09-19&from=2024-08-20&mc-api=json](https://domain.com?to=2024-09-19&from=2024-08-20&mc-api=json)
   [https://domain.com?to=2024-09-19&from=2024-08-20&mc-api=csv](https://domain.com?to=2024-09-19&from=2024-08-20&mc-api=csv)
   But if I use ICal here, which should be possible base on the docu:[https://domain.com?to=2024-09-19&from=2024-08-20&mc-api=ical](https://domain.com?to=2024-09-19&from=2024-08-20&mc-api=ical)
   It throws:
 *     ```wp-block-code
       Warning: Undefined array key "trigger" in /home/webpages/www/web/wp-content/plugins/my-calendar/includes/ical.php on line 98Deprecated: str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/webpages/www/web/wp-content/plugins/my-calendar/includes/ical.php on line 98Warning: Undefined array key "trigger" in /home/webpages/www/web/wp-content/plugins/my-calendar/includes/ical.php on line 99Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/webpages/www/web/wp-content/plugins/my-calendar/includes/ical.php on line 99Fatal error: Uncaught TypeError: Spatie\IcalendarGenerator\Components\Event::alertMinutesAfter(): Argument #1 ($minutes) must be of type int, string given, called in /home/webpages/www/web/wp-content/plugins/my-calendar/includes/ical.php on line 104 and defined in /home/webpages/www/web/wp-content/plugins/my-calendar/vendor/spatie/icalendar-generator/src/Components/Event.php:250 Stack trace: #0 /home/webpages/www/web/wp-content/plugins/my-calendar/includes/ical.php(104): Spatie\IcalendarGenerator\Components\Event->alertMinutesAfter('', '') #1 /home/webpages/www/web/wp-content/plugins/my-calendar/my-calendar-api.php(343): mc_generate_ical(Array) #2 /home/webpages/www/web/wp-content/plugins/my-calendar/my-calendar-api.php(103): mc_api_format_ical(Array) #3 /home/webpages/www/web/wp-content/plugins/my-calendar/my-calendar-api.php(78): mc_format_api(Array, 'ical') #4 /home/webpages/www/web/wp-includes/class-wp-hook.php(324): my_calendar_api(Object(WP)) #5 /home/webpages/www/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6 /home/webpages/www/web/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #7 /home/webpages/www/web/wp-includes/class-wp.php(418): do_action_ref_array('parse_request', Array) #8 /home/webpages/www/web/wp-includes/class-wp.php(813): WP->parse_request('') #9 /home/webpages/www/web/wp-includes/functions.php(1336): WP->main('') #10 /home/webpages/www/web/wp-blog-header.php(16): wp() #11 /home/webpages/www/web/index.php(17): require('/home/webpages/...') #12 {main} thrown in /home/webpages/www/web/wp-content/plugins/my-calendar/vendor/spatie/icalendar-generator/src/Components/Event.php on line 250
       ```
   
 * Furthermore I installed on Android ICSx^5 to collect data from ICal calendars
   and feed them to my Android calendar, which also doesn’t work any longer. Even
   with Thunderbird it’s not possible to collect ICal data.
   I’m using the url you’re
   presenting with the plugin: [https://domain.com/feed/my-calendar-ical/](https://domain.com/feed/my-calendar-ical/)
 * As I started a year ago with the plugin the feed only worked via the Google URL:
   [https://domain.com/feed/my-calendar-google/](https://domain.com/feed/my-calendar-google/)
 * Now this doesn’t work any longer, too.
 * I turned on all debug information WP has, but on a sync via Thunderbird or Android
   app, nothing gets written into the logs as warning or error.
 * Furthermore, if I download the ICS manually via the browser, there are not entries
   in it:
   [https://domain.com/feed/my-calendar-ics/](https://domain.com/feed/my-calendar-ics/)
 * I also tested all of these options with all plugins deactivated, so there was
   only my-calendar active and running.
 * Hopefully you have a fast solution for such a big problem.
 * Best regards

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

 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/ical-and-ics-doesnt-work-any-longer/#post-18027365)
 * So, the parameter ‘trigger’ that’s throwing this error is only present if you’re
   using the filter `mc_event_has_alarm` to generate an alarm on an event. By default,
   My Calendar will just bypass that entire code block. So it seems like you must
   have custom code that’s implementing an alarm, but isn’t defining the ‘trigger’
   parameter. I could probably harden this to ensure that parameter is set, but 
   practically speaking an alarm won’t do anything without this; since it represents
   the time offset between the event and the alarm.
 * If you don’t have anything that’s implementing an alarm, let me know.
 *  Thread Starter [mikeknappe](https://wordpress.org/support/users/mikeknappe/)
 * (@mikeknappe)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/ical-and-ics-doesnt-work-any-longer/#post-18035635)
 * You are right. It was the filter I added, to have an alarm on every appointment,
   because there is no field to add an alarm for an appointment on it’s own. Would
   be a nice feature in future by the way.
 * It work’s, again, if I use this:
 *     ```wp-block-code
       'trigger' => '-120'
       ```
   
 * Previously I had:
 *     ```wp-block-code
       'trigger' => '-PT2H'
       ```
   
 * Anyway, I’m confused about the feeds. Thunderbird Calendar and ICSx^5 are only
   able to work with the Google feed and not the ICS feed. What’s the main difference
   between both?
    -  This reply was modified 1 year, 7 months ago by [mikeknappe](https://wordpress.org/support/users/mikeknappe/).

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

The topic ‘ICal and ICS doesn’t work any longer’ is closed to new replies.

 * ![](https://ps.w.org/my-calendar/assets/icon-256x256.png?rev=1097576)
 * [My Calendar - Accessible Event Manager](https://wordpress.org/plugins/my-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/my-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-calendar/reviews/)

## Tags

 * [ical](https://wordpress.org/support/topic-tag/ical/)

 * 2 replies
 * 2 participants
 * Last reply from: [mikeknappe](https://wordpress.org/support/users/mikeknappe/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/ical-and-ics-doesnt-work-any-longer/#post-18035635)
 * Status: not resolved