In calendar views, the first field seems to always be displayed event if "Exclude from display" is checked.

Steps to reproduce the issue:

  1. Create a calendar view from template at admin/structure/views/add-template
  2. Add a field—I added a body field—and exclude it from display
  3. Rearrange the view: place excluded field in first position
  4. Preview or view the result: first field is displayed
Members fund testing for the Drupal project. Drupal Association Learn more


Pomliane’s picture

Priority: Normal » Major

The issue seems worse: the described behaviour in #1 seems to occur at any position except the last one.

There's also an odd behaviour for fields following the one which is hidden: when a long text field is checked to be excluded, all following fields are hidden but, if it's a nid field, they're not...

KarenS’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Something else is going on here, I cannot replicate this at all. Try again using the latest versions of both Date and Calendar. Also be sure you have the very latest version of Views. Finally be sure you clear your caches, including the Views cache (the Views cache clear is on the 'Tools' tab of Views.

Seeing a field you didn't expect to see is not a major bug that makes the code unusable. And I suspect this is actually a support question and not a bug at all because it is working fine for me.

Pomliane’s picture

Status: Postponed (maintainer needs more info) » Active
23.75 KB

I'm using date-7.x-2.5, calendar-7.x-3.1 and views-7.x-3.3.

The calendar was functional until today's combined calendar + views updates.
The excluded trimmed body field was originally rewritten in a tooltip title attribute so it's not exactly critical but any advanced usage of fields in a calendar seems a bit compromised—at least on this install.

Not sure it's important but the site is multilingual.

Attached is an export of a curated version of the view with the same issue.

smalltalkman’s picture

Status: Postponed (maintainer needs more info) » Active

I have the same problem: cannot exclude the date or any other field. Order does not matter. The label does not display properly.

The day page works fine. Month and week always display the date and do not display labels.

Calendar 7.x-3.2 Date 7.x-2.5 Views 7.x-3.3

only multi-day was a problem

KarenS’s picture

Status: Active » Postponed (maintainer needs more info)

The only place I see a problem is on the multiday rows, all other cells are rendered exactly as they should be. I fixed the problem on multiday rows in my commit to get Colorbox working.

You can't do a lot of advanced styling on the multiday rows, but all others defer completely to do whatever Views wants to do -- they will display exactly the same as if you displayed them in a table or list or any other type of display. I added a checkbox to allow you to choose which fields should be excluded on multiday rows so you can omit any that don't work right in the multiday format.

I just made this commit, so you'll need to have the latest dev code that contains it, which should be in the dev tarball tomorrow.

If there is a problem after that, I need steps to reproduce, because it's working fine for me.

heatherwoz’s picture

Title: First field is displayed even if "Exclude from display" is checked » Fields are displayed even if "Exclude from display" is checked
Version: 7.x-3.1 » 7.x-3.3
Status: Active » Postponed (maintainer needs more info)

Make sure you clear your caches! I just upgraded to 7.x-3.3 and all my fields that were excluded from display were showing. I tried a number of things to fix it, but nothing worked til I cleared ALL my caches.

tjerkdekuijper’s picture

I fixed this issue by changing line 540 in theme/theme.inc


in this:


Firstly I copied the entire calendar_preprocess_calendar_item function to my own template.php

5to1’s picture

I can confirm both the problem, and the fix as in #7.

Calendar 7.x-3.4
Views 7.x-3.7

rbrownell’s picture

Status: Postponed (maintainer needs more info) » Active

I too am having the same problem. I can also confirm that #7 is fixing the problem for me.

Echofive’s picture


I too am having the same problem.
I can also confirm that #7 is fixing the problem for me.

I add a patch to do it properly...

skadu’s picture

I was experiencing the same issue, the fix in #7 and the provided patch in #10 appear to fix the issue for me.

Thanks all.

hwasem’s picture

I can confirm this was an issue for us. We had multiday events with fields listed twice in the field list, but one instance was excluded. The hidden field was showing on the calendar.

We are using Colorbox to display the hidden field.

Patch in #10 and cache flush fixed the problem.

We are on:
Colorbox 7.x-2.9
Calendar 7.x-3.5
Date 7.x-2.9
Views 7.x-3.11

ron_s’s picture

Version: 7.x-3.3 » 7.x-3.x-dev
Status: Active » Reviewed & tested by the community

We found this issue on our own and solved it exactly as the patch in #10.

The reason why this problem seems to happen "intermittently" is it's dependent on having two fields with the same field name on the same view.

The way this can be replicated is add "nid" twice as a field on a calendar view. This is a common occurrence if needing to reference the content type on which the view is based, plus a referenced entity via relationships. For our use case, an additional step is enter the Style options settings (Format: Calendar | Settings), and select both "nid" checkboxes in "Fields to hide in Multi-day rows". Both nid's should be hidden from view, but one is displayed.

In the view, the fields will be stored as "nid" and "nid_1". The problem with using $field->field as the name to unset the rendered field is it's always going to be the actual name, which in this case is "nid". The value stored in $vars['rendered_fields'] references the Views field name ("nid_1") and not the actual field name ("nid").

Using $id, which references the name stored with the view, fixes this problem.