I have a view displaying a schedule for an event.

The weird is that to group them by date is broken only when I'm logged as admin.

To illustrate :

If I'm logged as admin I get :
Thursday, March 3rd
Session 1 12:00
Thursday, March 3rd
Session 2 14:00

If I'm logged as somebody else or not logged, I get :
Thursday, March 3rd
Session 1 12:00 - 13:00
Session 2 14:00 - 15:00

Notice that also, in the first case the time range is not displayed in full.

What I am displaying are fields which are pointed by sessions with a node reference.

The content type session has a node references field to :

  1. a time slot content type contanting one field date (starting-end)

The view is calling that time slot twice : to display it first with the day only , then with the time only.
This allows to group by day.

And what is happening is that the grouping by day works only when it is not admin. This is actually not a big deal (admin doesn't care much if it works for others except for him) but it is worth to mention it.

The view is following :

$view = new view;
$view->name = 'Schedule_without_speakers';
$view->description = 'Schedule of session without speakers appearing';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'field_session_slot_nid' => array(
    'id' => 'field_session_slot_nid',
    'table' => 'node_data_field_session_slot',
    'field' => 'field_session_slot_nid',
  ),
));
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'field_slot_datetime_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '<br >[field_slot_datetime_value]',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 0,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'label_type' => 'custom',
    'format' => 'day',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => '',
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'value',
    ),
    'exclude' => 1,
    'id' => 'field_slot_datetime_value',
    'table' => 'node_data_field_slot_datetime',
    'field' => 'field_slot_datetime_value',
    'relationship' => 'field_session_slot_nid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'field_slot_datetime_value2' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'label_type' => 'custom',
    'format' => 'time',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => '',
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_slot_datetime_value2',
    'table' => 'node_data_field_slot_datetime',
    'field' => 'field_slot_datetime_value2',
    'relationship' => 'field_session_slot_nid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('sorts', array(
  'field_slot_datetime_value' => array(
    'order' => 'ASC',
    'delta' => -1,
    'id' => 'field_slot_datetime_value',
    'table' => 'node_data_field_slot_datetime',
    'field' => 'field_slot_datetime_value',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'field_session_slot_nid',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'schedule_item' => 'schedule_item',
      'session' => 'session',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'field_session_slot_nid' => array(
    'operator' => 'not empty',
    'value' => array(),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'field_session_slot_nid',
    'table' => 'node_data_field_session_slot',
    'field' => 'field_session_slot_nid',
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('distinct', 1);
$handler->override_option('style_options', array(
  'grouping' => 'field_slot_datetime_value',
));
$handler->override_option('row_options', array(
  'inline' => array(
    'title' => 'title',
    'field_slot_datetime_value' => 'field_slot_datetime_value',
    'field_slot_datetime_value2' => 'field_slot_datetime_value2',
    'field_presenters_nid' => 'field_presenters_nid',
  ),
  'separator' => '',
  'hide_empty' => 0,
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'schedule_without_speakers');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'ScheduleWS',
  'description' => '',
  'weight' => '0',
  'name' => 'primary-links',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));

Comments

firebus’s picture

when there's a grouping problem that only occurs for logged in admin users, the culprit is usually the theme developer module.

if you have theme developer enabled, try disabling it and see if the problem goes away

see #708882: Document known problems caused by Theme developer module together with Views

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Update status to see whether theme developer fixes the issue for you.

Not theme developer but disabling theme developer.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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