I use Block view as mini month view. And if I set Day view format to table, something breaks my block view. On displayed block I can see that days with an event are colored, but with no links to an event. If I look for html classes it says "mini-day-on" and "calendar-empty". Like there is no event on that day.
From default (I reverted it) view I changed field for date and contextual filter. And that way it is working. As soon as I change format (to table) in day view, block view get broken. If I set month view to Table format, block view is working normaly.
Also If format is set to Calendar and I open settings for Calendar items I cannot apply anything because I recive an error "An illegal choice has been detected. Please contact the site administrator." As seen on the attached picture.
Any idea why this happens and if this two issues are related at all?

calendar-master-row-style-option.png31.27 KBgapa
Members fund testing for the Drupal project. Drupal Association Learn more


gapa’s picture

Still no comment. Am I setting something wrong? I tried with 7.x-3.x-dev version from 2011-Aug-07 but problem still occures.


gapa’s picture

As I noticed the second part of the problem is fixed. But I still cannot find an answer for the first part. Did enyone else noticed this problem?


gapa’s picture

OMG. Somethimes things shouldn't be so simple. :)
I just cloned calendar display Day into Day-new, disabled original (Day) and then I could change my new display. I then could change format for display to table.


Cyberwolf’s picture

I think the root cause of the problem lays in the fact that calendar tries to automatically find out which are the right view page displays to show overviews of a single date / full month / full year, by looping over all displays, checking if the display style is calendar and checking the type setting (month, year, day, ...). This happens in calendar_granularity_path() and is called by template_preprocess_calendar_datebox(). By doing this, any other display styles like unformatted, tables, ... are not able to be used by mini calendars as day / month path. The solution from comment #3 by gappa (cloning the display) seems to be a good workaround for now, as disabled displays are not exluded from the loop.

IMHO displays with the calendar style should have additional options to select the corresponding day, month, year displays, so it is always clear which path will be used.

leewillis77’s picture

We've been experiencing this bug recently as well, and came to the same workaround as well!

I think what you're saying is that because it can't find a "calendar" display style for day it's failing to link to anything? While I agree that an explicit setting for which display should be used to "drill-down to" - would it be possible to always drill though to the "day" display whatever its display style? That seems to make sense to me at least, but accepting that things would still break if you didn't have a "day" display seems an improvement?

Looking at the code I think the only way to identify it is by name in absence of it being set to the appropriate calendar type - which would, erm, suck I guess :)

KarenS’s picture

Status: Active » Fixed

This has been changed in the latest dev code. You should be able to use any display.

leewillis77’s picture

Perfect - thanks!

Status: Fixed » Closed (fixed)

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