Calendar feed issue – Ical not updating after change
-
Hello a number of our users (https://stockwoodparkrfc.co.uk) reported having issues where the calendar feeds were not updating when changes were made to fixtures on certain devices/software. One example was BusyCal on the Mac and also some versions of android operating system. After some research we discovered that some software/devices not only look at the date last updated in the Ical but also look at the E-tag in the page header before they look at the date updated on each record in the Ical. This is to stop unnecessary scanning of each record to see if changed. So – E-tag is checked first (E-tag is MD5 hash of output) and if different from previous then check each record to see if updated.
We made this change to get this working in the ical.php file in the feeds folder.
—-start of code snippet from ical.php
// End output
$output .= “END:VCALENDAR”;// Print headers
header(‘Content-type: text/calendar; charset=utf-8’);// ***Modification Start
// The E-Tag is not being changed when the output file is generated – Some Webdav clients do not like this and
// do not then ‘see’ that the file has changed – updates to the calendars are then not displayed to the user.$etag = md5($output);
header(‘Etag:’ . ‘”‘.$etag.'”‘);// ***Modification End
header(‘Content-Disposition: inline; filename=’ . $post->post_name . ‘.ics’);
// Print content
echo $output;——–end of code snippet from ical.php
Can we get this included as standard – assuming we haven’t broken anything else by doing this. ??
- The topic ‘Calendar feed issue – Ical not updating after change’ is closed to new replies.