10390 Posts in 2201 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 667 Views |
-
[SOLVED] Event Calendar ics trouble in SS 2.4

29 August 2011 at 4:59pm
Hello,
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:
http://eventcalendar.bluehousegroup.com/basic-calendar/My sites with Silverstripe 2.3.x do not have this issue.
Is anyone else having this issue?Cheers
-
Re: [SOLVED] Event Calendar ics trouble in SS 2.4

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 -
Re: [SOLVED] Event Calendar ics trouble in SS 2.4

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.
-
Re: [SOLVED] Event Calendar ics trouble in SS 2.4

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:
$this->getResponse()->addHeader('Content-Type', 'text/calendar');
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.
-
Re: [SOLVED] Event Calendar ics trouble in SS 2.4

20 September 2011 at 3:19pm
Wow. Thank you very much. That worked perfectly.
Cheers
| 667 Views | ||
|
Page:
1
|
Go to Top |


