Closed (fixed)
Project:
Date iCal
Version:
7.x-2.2
Component:
User interface
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2012 at 09:54 UTC
Updated:
28 Feb 2013 at 23:53 UTC
Jump to comment: Most recent
Comments
Comment #1
babbage commentedI too would be keen on this as an option.
Relevant discussion about the capacity for core's usual URL-creating functions to support this: #295021: Expand/augment UrlHelper::isValid() to improve correctness and handle more URL types
Comment #2
coredumperror commentedI'll add this feature to 7.x-2.x as soon as I can.
Comment #3
coredumperror commentedHaving looked into this over the weekend, it looks like it would be an extremely complicated mechanism to implement, due to the way that Views builds the URL for a display. As best as I can tell, it would require one of two things:
1) Inherit from
views_display_plguin_feedto create a whole new type of Views Display, so that you can override theget_path()and/orget_url()methods of that class. This feels like it might be out of scope for Date iCal.2) It might be possible to write an alter hook of some sort, but I haven't quite found the right way to do so.
Bearing this in mind, I personally don't have enough knowledge about the deep bowels of Views to implement this in a timely manner. But if anyone would like to do some research to figure out some way to implement this, I'd be happy to write the actual code.
Comment #4
coredumperror commentedI take it all back. This feature was dead easy to implement; I was just trying to go about it all wrong.
Rather than changing how the View itself outputs the URL, I just had to change the way that the orange iCal icon presents the URL. That change was a dinky one-liner, and is now available in the Date iCal 7.x-2.2 release.
Comment #5
Anonymous (not verified) commentedThis feature doesn't appear to be working for me. I'm using the 7.x-2.2 version. When I click on the ical link, it prompts me with the External Protocol Request and opens iCal. Once iCal is open, it shows the prompt "Enter the URL of the calendar you want to subscribe to" and has the Calendar URL filled in (webcal://rdcep.sites-test.globuscs.info/events/events.ics/2013-01). When I click on subscribe, it gives me an error: "There was an error subscribing to the calendar. There was an unexpected error with the request on subscribed calendars (error -1)."
I'm not as familiar with the webcal protocol, so I'm not sure if I'm missing something obvious here...? Is there an option to still use the http:// method?
Comment #6
coredumperror commentedThe first thing that comes to mind is that you may need to add a % to the path for your iCal Feed views display. Notice how "2013-01" is appearing after the
.icspart of the URL? That's because your base calendar view is using that contextual filter, but your iCal feed isn't configured to accept contextual filters. Changing the Path in the Feed Settings for your iCal Feed toevents/%/events.icsmight fix this problem for you.Please let me know if you need any more assistance. Otherwise, please close this issue if this suggestion worked for you.
Comment #7
coredumperror commentedI found an even better way to implement this feature, which made it easy to implement the option to switch between
http://andwebcal://. This new option is available in Date iCal 7.x-2.3.Comment #8
potassiumchloride commentedI'm using the Path in the feed settings, as you describe, but my ical link is still coming up as webcal://[site]?q=node/7/calendar/export.ics/2013-05
Can you advise?
Comment #9
gribnif commentedLooking at the code, it seems you are just changing http:// to webcal:// in the URL. That would be fine, unless your site uses SSL (https://) exclusively.
Comment #10
coredumperror commented@potassiumchloride: The reason you're seeing that "2013-05" on the end of the URL is because it's a contextual filter whcih is not being consumed by a placeholder. So, you need to add another % to your iCal feed's path. My guess is that it's now
node/%/calendar/export.ics. If so, you'll want to change it tonode/%/calendar/%/export.ics.@gribnif: I'll fix that. Thanks for the heads up.
Comment #11
potassiumchloride commented@coredumper - Thanks. That was it, exactly, and I couldn't seem to figure out that obvious answer.