10979 Posts in 2722 Topics by 1815 members
|Go to End|
29 August 2011 at 4:59pm
I've noticed .ics files do not work properly on Silverstripe 2.4.x for me. The ics files download, but the browser seems to treat them as html files. And when a calendar program tries to open the file it does not import the calendar event at all.
This is even happening on the event calendar demo for me:
My sites with Silverstripe 2.3.x do not have this issue.
Is anyone else having this issue?
31 August 2011 at 5:50am
I think it depends on your browser. For me, those ICS files download to iCal in Safari, but an older browser like IE may not know what to do with that content type.
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
31 August 2011 at 11:14am
I'm testing in Firefox 6, Chrome 13, IE9. I don't know which browser my client is using, but they are having the same issue.
The weird thing is on 2.3 installs the ics files work fine, but on 2.4 installs the ics files aren't recognised as ical data. The contents of the files are the same in each.
19 September 2011 at 6:51pm
SilverStripe seems to override the content-type of headers that are not set by SilverStripe's own header functions. Adding the following line to the top of your ics action in the Calendar_Controller class of Calendar.php should give you the correct header:
The same goes for the new ical action and the rss action, but with "text/xml" or "application/rss+xml" as the content type for rss.
20 September 2011 at 3:19pm
Wow. Thank you very much. That worked perfectly.
|Go to Top|