Hi there,

I am currently trying to set up an event calendar which needs to include 2 date repeat fields since Date Repeat does not allow for adding events that are scheduled at varying times of the day.

Many of the events to be scheduled (e.g. exhibitions) have the following structure (both dates are repeated for, say, 6 weeks):

Date 1:
Mo. to Thu.
3 to 6pm

Date 2:
Sun.
11am to 2pm

When I create a new calendar using the provided template based on "Date 1", I get a neatly laid out calendar which lists all repeated events based on Date 1 correctly. In the date field settings, I set "Multiple values" to 1 and uncheck "Multiple field settings".

Now, when I add "Date 2" to "Date 1" in the predefined contextual filter (under "Date field(s)"), all of the individual events are displayed on every date one of the events occurs. Please see the attached screenshot.

In order to bypass this issue, I could, for instance, create the same event twice:
1 for the regularly scheduled event dates, and 1 for those with deviating times of the day (usually, but not always on weekends). The downside of this approach is: Every event gets listed twice, visitors will post comments on the same event in 2 different places. Last but not least: What if an event is scheduled for, say, three or more different times of the day?

I am not sure whether I am facing a bug here, or whether my approach is flawed. Probably the latter. Any idea how to tackle this task?

Thanks in advance.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ethos_bass’s picture

FileSize
102.01 KB

I'm having exactly the same issue. In my situation it is movies that show at my bar. They show at 17:30 the first week (Tue - Sun) and at 20:00 the second week (again Tue - Sun). I'd like to have this reflected on the Views/Calender without having to create a separate node for each week.

The problem I'm having is that when I use only one date field (with repeating dates) everything works fine. When I introduce the second date field (in this case, used to input the second week and, as such, different show times) the 20:00 showtime is displayed on each of the dates of which were entered as repeating dates in the first week's date field.

For example (see screenshot). I created a node for the film Princess Bride. In the first date field I put its first week of screenings (August 6th through August 11th at 5:30pm). It works exactly as it should. Then, when I create and populate the second date field (August 13th through August 18th at 8:00pm), the 8:00 showtime is displayed on the dates of the first week, making it seem that the movie is showing at both 5:30pm and 8:00 on August 6th through August 11th, and none of the second week's dates are displayed.

I cannot tell if this is a shortcoming of the Calendar/Views code, or if it's due to an error in my settings (somehow juggling contextual filters, for example, to make this work). Does anyone have any insight, experience, or advice on how to make this work properly? The client for which I'm building this website does not want to create two nodes for each movie for the reasons mentioned by the original poster.

Thank you, for your time.

ethos_bass’s picture

FileSize
120.97 KB

A slight update and bit of progress that I thought I'd share with anyone who might be struggling with the same issue:

After reading a few other posts on general Calender issues I learned there was a contextual filter setup specifically for Views / Calender. If you enter word "date" into the search field when selecting a field to use as a contextual filter you'll find "Date: Date (node) - Filter any Views node date field by a date argument, using any common ISO date/period format (i.e. YYYY, YYYY-MM, YYYY-MM-DD, YYYY-W99, YYYY-MM-DD--P3M, P90D, etc)." near the bottom of the list. This creates a contextual filter which allows you to select multiple fields for one filter. You'll want to use this instead of creating two separate contextual filters.

After doing this myself my results were slightly better. To help make this clear I created a node with two date fields, date_1 and date_2, and my calender view display is configured to show node title and date (time only). Both fields configured to allow repeating dates. In the example I am about to explain, I created a node and entered into date_1 a repeating date (Tuesday August 6th at 5:30pm, repeating on T, W, Th, F, Sa, Su.). Then I entered into date_2 a single, non-repeating date (Tuesday, August 13th at 8:00pm). The attached screenshot is the results. You'll see the dates from date_1 are displaying correctly, except they also feature information from the date_2 field (in this case it's somehow picking up the 8:00pm time). On the 13th, well, it gets crazy. :-) If i had to guess it appears that the date_2 field is attempting to repeat the entirety of the date_1 field, meaning the entire multi-value information from date_1 (meaning the start date and the subsequent repeat dates as interpreted by the repeat rule) is being inserted into date_2's date. But that's just a casual observation.

I'll continue updating as I unravel this mystery. And if anyone else has some insight it would be greatly appreciated.

And, for the record, I have the latest -dev versions of Views, Calendar, and Date. I have cleared caches and edited and saved my views.

Thanks!

ethos_bass’s picture

Version: 7.x-2.6 » 7.x-2.x-dev
Category: support » bug

I'm beginning to think this should be elevated to a bug report. My apologies if I'm completely misunderstanding the situation.

rbosscher’s picture

I had the same problem, but with one field actually. When I removed the sorting on the date field the duplicates disapeared