When clicking on iCal button, the file is downloaded without any specified name (hence format as well).
For Firefox it looks like [temp_name].part
For Chrome default

Is it possible to download the files with specified .ics format?

Comments

turtletrail’s picture

Component: Miscellaneous » Code
turtletrail’s picture

Found this issue report http://drupal.org/node/1227128 on the previous version of the project.
None of the solutions listed there helped me.

I have just one contextual filter, which is a date.
I'm trying to attach iCal expord to month view, which has this url: calendar-field-date/month
The feed url is then: calendar-field-date/month/%/calendar.ics

does not work...

turtletrail’s picture

yeah, thanks for active support...

ended up creating my own module doing the same functionality.

c0ldfury’s picture

Yes, I'm having exactly the same problem and none of the 'solutions' work.

Traverus’s picture

I have found that this happens with sites that don't have "Clean URLs" enabled. I found putting this in my template file fixed the issue:

header('Content-type: text/calendar');
header('Content-Disposition: attachment; filename="calendar.ics"');

This will tell apache to send this as the given format and to download the file as 'calendar.ics'
You can put anything you want in the place of 'calendar'. Might be nice to make this a views configurable somehow or have the file name be something like 'event.[node:id].ics'.

babbage’s picture

(Somewhat of an aside regarding little-known functionality is that if you supply the link with webcal:// rather than http:// the feed will open automatically in many iCal-compatible applications directly, without the user having to open the file, and in that case the file extension should not matter. There is another issue here requesting this be added to the button automatically I believe.)

coredumperror’s picture

Title: The downloaded file name is not specified » Sites without "Clean URls" enabled can't properly download iCal feeds.
Version: 7.x-1.x-dev » 7.x-2.x-dev
Priority: Normal » Major

I'm going to look into fixing this in the 7.x-2.x branch, but I don't have time to hunt around in the 1.x branch to figure out a fix. If anyone would like to write up a patch for 1.x, I'll be glad to apply it.

coredumperror’s picture

Status: Active » Postponed (maintainer needs more info)

Further research on this has led me to conclude that this problem is caused by a limitation in the Views module, and implementing a fix for this would unfortunately require similar work as what would be needed for #1529506: webcal:// Support. I simply don't currently have time to research the necessary implementation for this fix, so I'm going to postpone it until either someone does the research for me, or I find the time myself.

coredumperror’s picture

Status: Postponed (maintainer needs more info) » Fixed

I had a sudden brainwave today about how to apply Traverus' solution as a sortof-hack around the problem presented by sites with Clean URLs disabled. It really is a hack, rather than a real solution, but I think it'll work just fine until/unless a full solution to the URL issues for iCal feeds can be found.

I'm leaving this issue as "fixed", rather then "closed (fixed)", since this isn't really the right fix. I've committed the change, and the 7.x-2.1 release is now available.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.