When having multiple Views displays with different amounts of fields, the following error notice occurs when viewing the display with a FullCalender:

Notice: Undefined index: FIELD_NAME in fullcalendar_plugin_style_fullcalendar->fullcalendar_parse_fields() (line 184 of PATH_TO_MODULE\fullcalendar\includes\views\plugins\fullcalendar_plugin_style_fullcalendar.inc).

Function fullcalendar_parse_fields() in fullcalendar/includes/views/plugins/fullcalendar_plugin_style_fullcalendar.inc gets field labels for the given display using the FullCalendar style plugin (ie. two fields), but then iterates through all the fields the view has (ie. 2 + an extra date field) instead of through the fields defined for the given display. This way it will find the extra date field, but cannot get the label from the $labels array.

My fix is to get the fields for the given display and iterate through these.

Current code:

  $labels = $this->display->handler->get_field_labels();
 
  $date_fields = array();
  foreach ($this->view->field as $id => $field) {

Fixed code:

  $labels = $this->display->handler->get_field_labels();
  $fields = $this->display->handler->get_handlers('field');
 
  $date_fields = array();
  foreach ($fields as $id => $field) {

(sorry for not being able to provide a patch)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lmeurs’s picture