What I'm trying to achieve is that if an event has multiple dates you can export all the dates to your Outlook calendar. I would like these to be imported into the user's default Calendar. What seems to happen is that multiple dates will create a new 'Untitled' calendar in Outlook.

To illustrate the problem I have attached 2 example ical feeds. I had to zip it because there's no support for ical files on uploads.

The example is a single node event with 1 date field and 2 date entries. The only difference is a view configuration as explained.

calendar_working.ical
Views: Enabled the checkbox "Display all values in the same row" under "Multiple field settings".
Result: Import works fine to Outlook in the default Calendar but only 1 of the dates are being saved.

calendar_not_working.ical
Views: Disabled the checkbox "Display all values in the same row" under "Multiple field settings".
Result: Import creates a new 'Untitled' calendar in Outlook however both dates are being saved.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

coredumperror’s picture

Alright, I think I may know the problem... but if it's what I think it is, I'm not sure there is any solution.

Looking at your working vs. non-working feeds, I see that the working one has exactly one VEVENT. I vaguely recall, when I first started working on Date iCal, that some calendar clients assume that single-event feeds should be added to an existing calendar, while multi-event feeds should be added together into a new calendar. Date iCal can't do anything about that, because that's an implementation detail of Outlook (and I think Google Calendar has the same problem).

However, all hope may not be lost. You mention a "Display all values in the same row" checkbox, but I don't know what that is. Where are you setting this option? Perhaps knowing more about this will help me find a workaround.

-Mania-’s picture

Some calendar clients assume that single-event feeds should be added to an existing calendar, while multi-event feeds should be added together into a new calendar.

Well that just makes no sense at all! :D

You mention a "Display all values in the same row" checkbox, but I don't know what that is.

Sure, for any field that has the number of values set to "unlimited" you get to define how views handles the field with multiple values. Screenshot attached.

coredumperror’s picture

Ohhhh, you're using a single date field with multiple values! Date iCal is designed to be able to handle single nodes with multiple date fields. I've never worked with a single date field with multiple values before, so I'm not sure how it would interact with Date iCal.

The iCal format doesn't support VEVENTs with multiple date values, but from your example feeds, it looks like Date iCal is accidentally doing the right thing. Maybe?

Unfortunately, that doesn't help with getting your feed to import into the calendar you want. I'm not really sure if there's anything I can do about that, though. :(

-Mania-’s picture

Hmm, okay, although not ideal I might get around to using multiple date fields. How do you get it to work with that? I've added another date field but I don't know how to have the feed pick it up as well? On iCal field settings you can only specify one field...

coredumperror’s picture

You use the "first populated date field" option. It will choose the first non-null date field in the node.

But now that I think about it, that doesn't really work for your setup, does it? I've never considered what it would mean, from Date iCal's perspective, to have one node with multiple, non-null dates. If you don't mind me asking, why do you have your site set up that way, rather than using multiple nodes with one date field each? Are you using the multi-value date fields to represent a repeating event?

-Mania-’s picture

Yes, exactly. An example (that I'm working on) is having a property listing with open times for inspection. Typically there's only one (the next one) but there might be a few times slotted in. I would like the user to import all those dates to their calendar. At this point I don't care if it's one date field with multiple values or multiple date fields. But from the looks of it I don't think Date iCal supports either way.

coredumperror’s picture

Actually, you can do that with Date iCal! You just need to leverage the "Date Repeat Field" submodule from Date.

Create a Date field on your content type, and set it's "Repeating date" option to Yes. Then, on the node edit page, put in a date and time, then enable the "Repeat" checkbox on the date field form. Also enable the "Include dates" checkbox, and you'll then be able to input a set of arbitrary additional dates that that the event repeats itself on.

If the time of each repeat is different, you may be out of luck. But if not, that should work.

-Mania-’s picture

I'm aware of the repeating date functionality but in my case the dates would be unique most of the time. As an example there might be 3 opening times during the week all at different times. I guess as an acceptable solution I'll have to somehow make it import each date separately e.g. something like this on the node page:

Opening times

  • Date 1 (Save to Calendar)
  • Date 2 (Save to Calendar)
  • Date 3 (Save to Calendar)
coredumperror’s picture

You could define a view with several displays (enough to cover the average number of different opening times), each of which are identical except that they each use a different date field on your content type. Then you could connect each "Save to Calendar" link to the appropriate display's iCal feed.

That's about the best I can offer, though. It would probably be possible to change Date iCal to support this functionality, but I'm super busy at work right now, and haven't got time to implemented anything like that.

-Mania-’s picture

That'll probably work, I'll give it a shot. Thanks for all your help!

coredumperror’s picture

Status: Active » Closed (fixed)

Closing this issue as cleanup. Re-open if needed.