After upgrade from 2.3 to 2.4, date field in filter does not appear in resulting query, either in preview or in production. Upgrade to 2.5 does not resolve issue.

Tried several types of operators (equal to, between, greater than) with no change. Latest view export and SQL included below:

$view = new view;
$view->name = 'upcoming_games';
$view->description = 'Upcoming gamees';
$view->tag = 'games';
$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('fields', array(
  'field_gamedate_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'short',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_gamedate_value',
    'table' => 'node_data_field_gamedate',
    'field' => 'field_gamedate_value',
    'relationship' => 'none',
  ),
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'field_playingfield_nid' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_playingfield_nid',
    'table' => 'node_data_field_playingfield',
    'field' => 'field_playingfield_nid',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'field_gamedate_value' => array(
    'order' => 'ASC',
    'delta' => -1,
    'id' => 'field_gamedate_value',
    'table' => 'node_data_field_gamedate',
    'field' => 'field_gamedate_value',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'game' => 'game',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => '>=',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => 'now',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'date_fields' => array(
      'node_data_field_gamedate.field_gamedate_value' => 'node_data_field_gamedate.field_gamedate_value',
    ),
    'date_method' => 'OR',
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 30);
$handler->override_option('use_more', 1);
$handler->override_option('row_options', array(
  'inline' => array(
    'field_team_away_nid' => 'field_team_away_nid',
    'field_gamedate_value' => 'field_gamedate_value',
    'field_playingfield_nid' => 'field_playingfield_nid',
    'field_team_home_nid' => 'field_team_home_nid',
  ),
  'separator' => '',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('items_per_page', 10);
$handler->override_option('block_description', 'Upcoming Games');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'games');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));
SELECT node.nid AS nid,
   node_data_field_gamedate.field_gamedate_value AS node_data_field_gamedate_field_gamedate_value,
   node.type AS node_type,
   node.vid AS node_vid,
   node.title AS node_title,
   node_data_field_gamedate.field_playingfield_nid AS node_data_field_gamedate_field_playingfield_nid
 FROM drupal_node node 
 LEFT JOIN drupal_content_type_game node_data_field_gamedate ON node.vid = node_data_field_gamedate.vid
 WHERE (node.status <> 0) AND (node.type in ('game'))
   ORDER BY node_data_field_gamedate_field_gamedate_value ASC

Comments

merlinofchaos’s picture

Project: Views (for Drupal 7) » Date
Version: 6.x-2.4 » 6.x-2.x-dev

If you only read one of these submission guidelines, read this one. (Then please read the rest) If your problem deals exclusively with fields or filters provided by another module (CCK, Image, VotingAPI are common) please post the issue under the queue for that module first; all modules are responsible for telling Views about their own fields. It's possible Views IS at fault, but the module maintainers are the best people to make that determination, and they can kick the issue into the Views queue with an explanation of what's wrong if that is the case.

jgottshall’s picture

Sorry. I *did* read that guideline, but I considered that since the date fields were working fine before the upgrade from 2.3 to 2.4 it was more likely a problem in Views than a problem in Date. Obviously that assumption was inappropriate. My bad!

ravik’s picture

A have the same problem. After upgrade from 6.x.2.3 to 6.x.2.5 date filter works only with absolute values. The relative values does not act. I tried "is greater than ot equal to" with relative value "now" - nothing happened. Before upgrade everything works

$view = new view;
$view->name = 'calendar';
$view->description = 'A multi-dimensional calendar view with back/next navigation.';
$view->tag = 'Calendar';
$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('fields', array(
  'title' => array(
    'label' => '',
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'field' => 'title',
    'table' => 'node',
    'relationship' => 'none',
  ),
  'field_time_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'medium',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => 0,
    ),
    'repeat' => array(
      'show_repeat_rule' => 'show',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_time_value',
    'table' => 'node_data_field_time',
    'field' => 'field_time_value',
    'relationship' => 'none',
  ),
  'field_date_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'medium',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_date_value',
    'table' => 'node_data_field_date',
    'field' => 'field_date_value',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'field_date_value' => array(
    'id' => 'field_date_value',
    'table' => 'node_data_field_date',
    'field' => 'field_date_value',
  ),
));
$handler->override_option('arguments', array(
  'date_argument' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'Все',
    'title' => '',
    'default_argument_type' => 'date',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'date_fields' => array(
      'node_data_field_date.field_date_value' => 'node_data_field_date.field_date_value',
    ),
    'year_range' => '-3:+3',
    'date_method' => 'OR',
    'granularity' => 'month',
    'id' => 'date_argument',
    'table' => 'node',
    'field' => 'date_argument',
    'relationship' => 'none',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'event_kino' => 0,
      'event_other' => 0,
      'event_theatre' => 0,
      'films' => 0,
      'news' => 0,
      'pages' => 0,
      'podcast' => 0,
      'teatr' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '3' => 0,
      '2' => 0,
      '4' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_php' => '',
    'override' => array(
      'button' => 'Override',
    ),
    'default_options_div_prefix' => '',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
    ),
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => 1,
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'event_kino' => 'event_kino',
      'event_other' => 'event_other',
      'event_theatre' => 'event_theatre',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
  'role' => array(),
  'perm' => '',
));
$handler->override_option('title', 'Афиша Севастополя');
$handler->override_option('items_per_page', 0);
$handler->override_option('use_more', 0);
$handler->override_option('style_plugin', 'calendar_nav');
$handler = $view->new_display('calendar', 'Calendar page', 'calendar_1');
$handler->override_option('path', 'calendar');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));
$handler->override_option('calendar_colors', array(
  '0' => array(),
));
$handler->override_option('calendar_colors_vocabulary', array());
$handler->override_option('calendar_colors_taxonomy', array());
$handler->override_option('calendar_popup', 0);
$handler->override_option('calendar_date_link', '');
$handler = $view->new_display('calendar_block', 'Calendar block', 'calendar_block_1');
$handler->override_option('block_description', 'Календарь');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('calendar_period', 'Year view', 'calendar_period_1');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'display_type' => 'year',
  'name_size' => 1,
  'max_items' => 0,
  'truncated_fields' => array(),
  'truncate_length' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'year');
$handler = $view->new_display('calendar_period', 'Month view', 'calendar_period_2');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'display_type' => 'month',
  'name_size' => '99',
  'with_weekno' => '1',
  'date_fields' => NULL,
  'max_items' => 0,
  'truncated_fields' => array(),
  'truncate_length' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'month');
$handler = $view->new_display('calendar_period', 'Day view', 'calendar_period_3');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'name_size' => '99',
  'with_weekno' => 0,
  'max_items' => 0,
  'max_items_behavior' => 'more',
  'groupby_times' => 'hour',
  'groupby_times_custom' => '',
  'groupby_field' => '',
  'truncated_fields' => array(),
  'truncate_length' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'day');
$handler = $view->new_display('calendar_period', 'Week view', 'calendar_period_4');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'name_size' => '99',
  'with_weekno' => 0,
  'max_items' => 0,
  'max_items_behavior' => 'more',
  'groupby_times' => 'hour',
  'groupby_times_custom' => '',
  'groupby_field' => '',
  'truncated_fields' => array(),
  'truncate_length' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'week');
$handler = $view->new_display('calendar_period', 'Block view', 'calendar_period_5');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'display_type' => 'month',
  'name_size' => '1',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 0,
  'default' => 0,
  'calendar_block_1' => 'calendar_block_1',
));
$handler->override_option('calendar_type', 'month');
$handler = $view->new_display('block', 'Upcoming', 'block_1');
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'field' => 'title',
    'table' => 'node',
    'relationship' => 'none',
    'format' => 'default',
  ),
  'field_date_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'short',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_date_value',
    'table' => 'node_data_field_date',
    'field' => 'field_date_value',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array());
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => 1,
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'event_kino' => 'event_kino',
      'event_other' => 'event_other',
      'event_theatre' => 'event_theatre',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'date_filter_1' => array(
    'operator' => '>=',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => 'now',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'date_fields' => array(
      'node_data_field_date.field_date_value' => 'node_data_field_date.field_date_value',
    ),
    'date_method' => 'OR',
    'granularity' => 'hour',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => '',
    'year_range' => '-1:+3',
    'id' => 'date_filter_1',
    'table' => 'node',
    'field' => 'date_filter',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('footer', ' <a href="http://sevnews.ru/events">вся афиша »</a>');
$handler->override_option('footer_format', '1');
$handler->override_option('footer_empty', 0);
$handler->override_option('items_per_page', 12);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
  'grouping' => '',
  'type' => 'ul',
));
$handler->override_option('block_description', 'Upcoming');
$handler->override_option('block_caching', -1);
SELECT node.nid AS nid, 
node.title AS node_title, 
node_data_field_date.field_date_value AS node_data_field_date_field_date_value, 
node.type AS node_type, 
node.vid AS node_vid 
FROM sevnews_node node 
LEFT JOIN sevnews_content_field_date node_data_field_date ON node.vid = node_data_field_date.vid 
WHERE (node.status <> 0) AND (node.type in ('event_kino', 'event_other', 'event_theatre')) 
ORDER BY node_data_field_date_field_date_value ASC
jparets’s picture

I have the same problem. I have not tried previous versions but in the latest ones (Date 2.1 and Views 2.5) relative filters does not work.
A temporary solution is to expose the filter, but not always this is a convenient solution.

For instance, when filter is NOT exposed the SQL query does not include WHERE conditions for date:

SELECT node.nid AS nid,
node.title AS node_title,
node_data_field_tarea_actividad.field_tarea_cuando_value AS node_data_field_tarea_actividad_field_tarea_cuando_value,
node_data_field_tarea_actividad.field_tarea_cuando_value2 AS node_data_field_tarea_actividad_field_tarea_cuando_value2,
node.type AS node_type,
node.vid AS node_vid
FROM node node
INNER JOIN users users ON node.uid = users.uid
LEFT JOIN content_type_tarea node_data_field_tarea_actividad ON node.vid = node_data_field_tarea_actividad.vid
WHERE (node.type in ('tarea')) AND (node_data_field_tarea_actividad.field_tarea_actividad_nid = 222)

The same view whith the date field exposed generates the following sql sentence:

SELECT node.nid AS nid,
node.title AS node_title,
node_data_field_tarea_cuando.field_tarea_cuando_value AS node_data_field_tarea_cuando_field_tarea_cuando_value,
node_data_field_tarea_cuando.field_tarea_cuando_value2 AS node_data_field_tarea_cuando_field_tarea_cuando_value2,
node.type AS node_type,
node.vid AS node_vid
FROM node node
INNER JOIN users users ON node.uid = users.uid
LEFT JOIN content_type_tarea node_data_field_tarea_cuando ON node.vid = node_data_field_tarea_cuando.vid
WHERE ((node.type in ('tarea')) AND (node_data_field_tarea_cuando.field_tarea_actividad_nid = 222))
AND (DATE_FORMAT(ADDTIME(STR_TO_DATE(node_data_field_tarea_cuando.field_tarea_cuando_value, '%Y-%m-%dT%T'), SEC_TO_TIME(7200)), '%Y-%m-%d') >= '2009-04-18')

Teh relative operator used in both queries is "now"

The difference is obvious, but why?
I hope this information will be useful
Thank you four your efforts.

gpk’s picture

Status: Active » Postponed (maintainer needs more info)

Which version of Date are you running? Date 6.x-2.1 has a known problem that was fixed in http://drupal.org/cvs?commit=188786, and is available in Date 6.x-2.x-dev.

ravik’s picture

devel version 6.x-2.x-dev have the same bug

gpk’s picture

Status: Postponed (maintainer needs more info) » Active

OK, resetting status then.

gordon’s picture

Assigned: Unassigned » gordon
Status: Active » Needs review
StatusFileSize
new1.05 KB

Hi,

I hunted thought and this was my solution to this problem.

Gordon.

McAldo’s picture

Assigned: gordon » Unassigned
Status: Needs review » Reviewed & tested by the community

Thank you for this patch. I patched the file and load up to the server. This solved the problem.

McAldo

ravik’s picture

gordon, my thanks to you for patch. it works for me too.

jgottshall’s picture

Concur: patch resolves issue. Please apply.

archjpres’s picture

Not sure, patch works for the default view, but not for the block view, if I create an attachment to the block and inherit the filters it works.

nasheet’s picture

Hello,

I also had this problem that when I upgraded the Date module, the relative values for a date in the views module do not work. I can only use absolute values. I upgraded from 6.x-2.0 to 6.x-2.1. I don't know how you can upgrade from 2.3 when it doesn't exist yet. (are you talking about drupal 5.x??

Anyway, if this patch is indeed for the drupal 6.x version. Could you please guide me on how to install it? Where do I place the patch in the date_api_filter_handler.inc file?

Thank you very much.

cmav77’s picture

Thanks for the patch, gordon.

It worked just fine in a block display for me (without a default Date filter).

nasheet, a patch is really just a diff on the old version and the new version of the file. Small patches like this one are easy to apply manually. This patch says:

Insert 3 lines of code to this file: sites/all/modules/date/includes/date_api_filter_handler.inc

       if ($this->force_value) {
         $this->value[$prefix] = $this->default_value($prefix);
       }
+      else if (!$this->options['exposed'] && empty($this->value[$prefix])) {
+        $this->value[$prefix] = $this->default_value($prefix);
+      } 
       else {
         if (empty($part)) {
           return '';

The lines with the '+' get inserted (the other lines already exist in the file). You can search for those lines to find where to insert the patch. In this case, insert the 3 '+' lines at line 432 of ate_api_filter_handler.inc.

Hope that helps,

Chris

katiusha’s picture

I confirm the patch is working for the default display, the page display and the block display.
Thank you, gordon, for it.

m.indyk’s picture

thank you gordon, this patch just fixed my problem.
karma gordon++

nasheet’s picture

Thanks Chris for helping me with the patch. Unfortunately the patch did not solve my problem. I did not update my version to the latest development version, which must be the reason the patch did not work.

So I downloaded the dev version from the front page of the Date Module and installed it, but then I got this error about 20 times:

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/wpcweb/public_html/modules/date/includes/date_api_argument_handler.inc on line 234.

What is it that I am doing wrong?

Thanks in advance.

salbertz’s picture

I can't confirm the above comment. I Just stumbled around the problem (drupal 6.10 + date 6.x-2.1) and found the patch to work perfectly with date 6.x-2.1. Thanks a lot!

nasheet’s picture

okay, Confirmed. I figured it out. The patch works on 6.x-2.1. I just needed a little confidence, I guess.
Thanks

karens’s picture

Priority: Critical » Normal
Status: Reviewed & tested by the community » Needs work

I can't find any possible way to replicate this problem using the latest -dev code. I tried all kinds of things and everything I tried worked fine in the current code. I tried dates that use select widgets and dates that use popup widgets and different granularities and everything worked flawlessly. I will keep watching this, but if people still see this in the very latest code I need a simple, specific example of how to reproduce the problem, which will need to include information about the type of date being used in the view as well as the way the view is set up.

karens’s picture

Status: Needs work » Active

OK, I can now replicate problems if you are using a filter other than the select filter. The select widget works absolutely fine for me, so if you're having trouble and need a quick workaround, click on the filter settings icon (the thing that looks like a gear to the right of the filter) and you will see an option to select 'Date form type'. Make sure 'Select' is chosen, then save the setting and re-save the view and the exposed filter should behave correctly.

I am still digging into what the problems are with the other widgets.

karens’s picture

Title: Date filter ignored by Views after upgrade from 2.3 to 2.4 (and 2.5) » Problems with exposed date filter

There are a slew of problem reports about the exposed date filter and they all are the same issue, so re-naming this for clarity.

mstef’s picture

*Using "Select" does NOT WORK. Same usability as the popup.

patchak’s picture

I confirm that using latest dev version of date, the data is not displayed on my view by default when I use a select widget. I can filter the nodes fine, but when you arrive on the view and expected to see all nodes unfiltered, nothing shows up!!

Patchak

karens’s picture

#23 & #24, saying it does not work is worse than useless if you don't provide specific information to help me replicate your problem. It works for me. It doesn't work for you. That's all I know. There is absolutely no way I can fix this if no one will give me any help.

What kind of date field are you using? How exactly is it configured (an export from Content Copy will show me that)? How exactly is your view configured (an export of the view will show that)? What version of PHP are you using? What are some examples of the dates that are in your database that are not showing up in your view.

patchak’s picture

KarenS: You're totally right, sorry about the bad help. Here is a better one :

Using :

Date dev version from may 05
CCK dev from march 07
PHP 5.2.9

I'm using three Datefield field configured like this :

$content['fields']  = array (
  0 => 
  array (
    'label' => 'Premier entretien',
    'field_name' => 'field_ppe_premier_entretien_',
    'type' => 'datetime',
    'widget_type' => 'date_text',
    'change' => 'Modifier les informations de base',
    'weight' => '83',
    'default_value' => 'blank',
    'default_value2' => 'same',
    'default_value_code' => '',
    'default_value_code2' => '',
    'input_format' => 'd.m.Y - H:i:s',
    'input_format_custom' => 'd.m.Y',
    'advanced' => 
    array (
      'label_position' => 'above',
      'text_parts' => 
      array (
        'year' => 0,
        'month' => 0,
        'day' => 0,
        'hour' => 0,
        'minute' => 0,
        'second' => 0,
      ),
    ),
    'increment' => '1',
    'year_range' => '-3:+3',
    'label_position' => 'above',
    'text_parts' => 
    array (
    ),
    'description' => '',
    'group' => 'group_ppe_dates',
    'required' => 0,
    'multiple' => '0',
    'repeat' => 0,
    'todate' => '',
    'granularity' => 
    array (
      'year' => 'year',
      'month' => 'month',
      'day' => 'day',
    ),
    'default_format' => 'short',
    'tz_handling' => 'none',
    'timezone_db' => '',
    'op' => 'Enregistrer les paramètres du champ',
    'module' => 'date',
    'widget_module' => 'date',
    'columns' => 
    array (
      'value' => 
      array (
        'type' => 'datetime',
        'not null' => false,
        'sortable' => true,
        'views' => true,
      ),
    ),
    'display_settings' => 
    array (
      'label' => 
      array (
        'format' => 'above',
        'exclude' => 0,
      ),
      'teaser' => 
      array (
        'format' => 'short',
        'exclude' => 0,
      ),
      'full' => 
      array (
        'format' => 'short',
        'exclude' => 0,
      ),
      4 => 
      array (
        'format' => 'short',
        'exclude' => 0,
      ),
      'token' => 
      array (
        'format' => 'short',
        'exclude' => 0,
      ),
    ),
  ),
  1 => 
  array (
    'label' => 'Début mission',
    'field_name' => 'field_ppe_debut_mission',
    'type' => 'datetime',
    'widget_type' => 'date_popup',
    'change' => 'Modifier les informations de base',
    'weight' => '87',
    'default_value' => 'blank',
    'default_value2' => 'same',
    'default_value_code' => '',
    'default_value_code2' => '',
    'input_format' => 'd.m.Y',
    'input_format_custom' => '',
    'year_range' => '-3:+3',
    'increment' => '1',
    'advanced' => 
    array (
      'label_position' => 'above',
      'text_parts' => 
      array (
        'year' => 0,
        'month' => 0,
        'day' => 0,
        'hour' => 0,
        'minute' => 0,
        'second' => 0,
      ),
    ),
    'label_position' => 'above',
    'text_parts' => 
    array (
    ),
    'description' => '',
    'group' => 'group_ppe_dates',
    'required' => 0,
    'multiple' => '0',
    'repeat' => 0,
    'todate' => '',
    'granularity' => 
    array (
      'year' => 'year',
      'month' => 'month',
      'day' => 'day',
      'hour' => 'hour',
      'minute' => 'minute',
    ),
    'default_format' => 'field_ppe_debut_mission_default',
    'tz_handling' => 'site',
    'timezone_db' => 'UTC',
    'op' => 'Enregistrer les paramètres du champ',
    'module' => 'date',
    'widget_module' => 'date',
    'columns' => 
    array (
      'value' => 
      array (
        'type' => 'datetime',
        'not null' => false,
        'sortable' => true,
        'views' => true,
      ),
    ),
    'display_settings' => 
    array (
      'label' => 
      array (
        'format' => 'above',
        'exclude' => 0,
      ),
      'teaser' => 
      array (
        'format' => 'field_ppe_debut_mission_default',
        'exclude' => 0,
      ),
      'full' => 
      array (
        'format' => 'field_ppe_debut_mission_default',
        'exclude' => 0,
      ),
      4 => 
      array (
        'format' => 'field_ppe_debut_mission_default',
        'exclude' => 0,
      ),
      'token' => 
      array (
        'format' => 'field_ppe_debut_mission_default',
        'exclude' => 0,
      ),
    ),
  ),
  2 => 
  array (
    'label' => 'Fin mission',
    'field_name' => 'field_ppe_fin_mission',
    'type' => 'datetime',
    'widget_type' => 'date_popup',
    'change' => 'Modifier les informations de base',
    'weight' => '88',
    'default_value' => 'blank',
    'default_value2' => 'same',
    'default_value_code' => '',
    'default_value_code2' => '',
    'input_format' => 'd.m.Y',
    'input_format_custom' => '',
    'year_range' => '-3:+3',
    'increment' => '1',
    'advanced' => 
    array (
      'label_position' => 'above',
      'text_parts' => 
      array (
        'year' => 0,
        'month' => 0,
        'day' => 0,
        'hour' => 0,
        'minute' => 0,
        'second' => 0,
      ),
    ),
    'label_position' => 'above',
    'text_parts' => 
    array (
    ),
    'description' => '',
    'group' => 'group_ppe_dates',
    'required' => 0,
    'multiple' => '0',
    'repeat' => 0,
    'todate' => '',
    'granularity' => 
    array (
      'year' => 'year',
      'month' => 'month',
      'day' => 'day',
    ),
    'default_format' => 'field_ppe_fin_mission_default',
    'tz_handling' => 'none',
    'timezone_db' => 'Europe/Paris',
    'op' => 'Enregistrer les paramètres du champ',
    'module' => 'date',
    'widget_module' => 'date',
    'columns' => 
    array (
      'value' => 
      array (
        'type' => 'datetime',
        'not null' => false,
        'sortable' => true,
        'views' => true,
      ),
    ),
    'display_settings' => 
    array (
      'label' => 
      array (
        'format' => 'above',
        'exclude' => 0,
      ),
      'teaser' => 
      array (
        'format' => 'field_ppe_fin_mission_default',
        'exclude' => 0,
      ),
      'full' => 
      array (
        'format' => 'field_ppe_fin_mission_default',
        'exclude' => 0,
      ),
      4 => 
      array (
        'format' => 'field_ppe_fin_mission_default',
        'exclude' => 0,
      ),
      'token' => 
      array (
        'format' => 'field_ppe_fin_mission_default',
        'exclude' => 0,
      ),
    ),
  ),
);

Here are only my "Date" exposed filters from views :

'date_filter' => array(
    'operator' => 'between',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => '',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'date_filter_op',
      'identifier' => 'date_filter',
      'label' => 'Début de mission',
      'optional' => 1,
      'remember' => 0,
    ),
    'date_fields' => array(
      'node_data_field_ppe_debut_mission.field_ppe_debut_mission_value' => 'node_data_field_ppe_debut_mission.field_ppe_debut_mission_value',
    ),
    'date_method' => 'OR',
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => '',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
  'date_filter_1' => array(
    'operator' => 'between',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => '',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'date_filter_1_op',
      'identifier' => 'date_filter_1',
      'label' => 'Fin de mission',
      'optional' => 1,
      'remember' => 0,
    ),
    'date_fields' => array(
      'node_data_field_ppe_fin_mission.field_ppe_fin_mission_value' => 'node_data_field_ppe_fin_mission.field_ppe_fin_mission_value',
    ),
    'date_method' => 'OR',
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => '',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'date_filter_1',
    'table' => 'node',
    'field' => 'date_filter',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
  'title_1' => array(
    'operator' => 'contains',
    'value' => '',
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'title_1_op',
      'identifier' => 'title_1',
      'label' => 'CP relié',
      'optional' => 1,
      'remember' => 0,
    ),
    'case' => 0,
    'id' => 'title_1',
    'table' => 'node',
    'field' => 'title',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'field_ppe_cp__nid',
  ),
  'date_filter_2' => array(
    'operator' => 'between',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => '',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'date_filter_2_op',
      'identifier' => 'date_filter_2',
      'label' => 'Premier entretien',
      'optional' => 1,
      'remember' => 0,
    ),
    'date_fields' => array(
      'node_data_field_ppe_premier_entretien_.field_ppe_premier_entretien__value' => 'node_data_field_ppe_premier_entretien_.field_ppe_premier_entretien__value',
    ),
    'date_method' => 'OR',
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => '',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'date_filter_2',
    'table' => 'node',
    'field' => 'date_filter',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),

So the symptom for me is that when I go to the page view, there are no rows displayed. The filters work, but I can only see some nodes once i select any filter. Normally using views you see all possible nodes when you expose filters. In this case exposing the date filter removes all nodes from display, so you are forced to use at least one filter to actually get any results.

It's still usable of course.

Hope this help more ;)
Thanks a lot for your great work and help!!

Patchak

karens’s picture

@patchak, your problem is fixed now. You have an exposed filter with no default value and that particular option was mis-handled. That fix is in cvs now. See how fast I can work when I have details to work with :)

mstef’s picture

My apologies. I was just referring to your solution.

PHP 5.2.4
Latest supported CCK & Date
Drupal 6
Views 2

Date problems related to two cck node types. One uses a single datetime and the other uses a to/from datetime.

View export for one of the cck types:

$view = new view;
$view->name = 'Events';
$view->description = 'Event panes and pages';
$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('fields', array(
  'title' => array(
    'label' => 'Event',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'tid' => array(
    'label' => 'Type',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'type' => 'separator',
    'separator' => ', ',
    'empty' => '',
    'link_to_taxonomy' => 1,
    'limit' => 1,
    'vids' => array(
      '8' => 8,
      '2' => 0,
      '1' => 0,
      '3' => 0,
      '4' => 0,
      '5' => 0,
      '7' => 0,
      '6' => 0,
    ),
    'exclude' => 0,
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'relationship' => 'none',
  ),
  'field_company_nid' => array(
    'label' => 'Company',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_company_nid',
    'table' => 'node_data_field_company',
    'field' => 'field_company_nid',
    'relationship' => 'none',
  ),
  'field_clientnode_nid' => array(
    'label' => 'Contact',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_clientnode_nid',
    'table' => 'node_data_field_clientnode',
    'field' => 'field_clientnode_nid',
    'relationship' => 'none',
  ),
  'field_timeframe_value' => array(
    'label' => 'Date',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'custom',
    'format' => 'default',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'value',
    ),
    'exclude' => 0,
    'id' => 'field_timeframe_value',
    'table' => 'node_data_field_timeframe',
    'field' => 'field_timeframe_value',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'score' => array(
    'order' => 'DESC',
    'id' => 'score',
    'table' => 'search_index',
    'field' => 'score',
    'relationship' => 'none',
  ),
  'created' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'keys' => array(
    'operator' => 'optional',
    'value' => '',
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'keys_op',
      'identifier' => 'keys',
      'label' => 'Search',
      'optional' => 1,
      'remember' => 0,
    ),
    'id' => 'keys',
    'table' => 'search_index',
    'field' => 'keys',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => '=',
    'value' => array(
      'min' => NULL,
      'max' => NULL,
      'value' => NULL,
      'default_date' => '',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'operator' => 'date_filter_op',
      'label' => 'Date',
      'use_operator' => 0,
      'identifier' => 'date_filter',
      'optional' => 1,
      'remember' => 0,
    ),
    'date_fields' => array(
      'node_data_field_timeframe.field_timeframe_value' => 'node_data_field_timeframe.field_timeframe_value',
    ),
    'date_method' => 'OR',
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => '',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'date_filter',
    'table' => 'comments',
    'field' => 'date_filter',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'tid' => array(
    'operator' => 'or',
    'value' => array(),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_op',
      'identifier' => 'tid',
      'label' => 'Type',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 0,
    ),
    'type' => 'select',
    'limit' => TRUE,
    'vid' => '8',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'field_company_nid' => array(
    'operator' => 'or',
    'value' => array(),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'field_company_nid_op',
      'identifier' => 'field_company_nid',
      'label' => 'Company',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 0,
    ),
    'id' => 'field_company_nid',
    'table' => 'node_data_field_company',
    'field' => 'field_company_nid',
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'field_clientnode_nid' => array(
    'operator' => 'or',
    'value' => array(),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'field_clientnode_nid_op',
      'identifier' => 'field_clientnode_nid',
      'label' => 'Contact',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 0,
    ),
    'id' => 'field_clientnode_nid',
    'table' => 'node_data_field_clientnode',
    'field' => 'field_clientnode_nid',
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'field_userattention_uid' => array(
    'operator' => 'or',
    'value' => array(),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'field_userattention_uid_op',
      'identifier' => 'field_userattention_uid',
      'label' => 'Attention',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 0,
    ),
    'id' => 'field_userattention_uid',
    'table' => 'node_data_field_userattention',
    'field' => 'field_userattention_uid',
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'uid_current' => array(
    'operator' => '=',
    'value' => FALSE,
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'operator' => '',
      'identifier' => 'uid_current',
      'label' => 'Mine',
      'optional' => 1,
      'remember' => 0,
    ),
    'id' => 'uid_current',
    'table' => 'users',
    'field' => 'uid_current',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'event' => 'event',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('title', 'Events');
$handler->override_option('header', '<a href="/node/add/event/" class="popups-form">Add a New Event</a>');
$handler->override_option('header_format', '2');
$handler->override_option('header_empty', 1);
$handler->override_option('empty', 'No events have been entered yet.');
$handler->override_option('empty_format', '2');
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 5);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'title' => 'title',
    'tid' => 'tid',
    'field_company_nid' => 'field_company_nid',
    'field_clientnode_nid' => 'field_clientnode_nid',
    'field_timeframe_value' => 'field_timeframe_value',
  ),
  'info' => array(
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'tid' => array(
      'separator' => '',
    ),
    'field_company_nid' => array(
      'separator' => '',
    ),
    'field_clientnode_nid' => array(
      'separator' => '',
    ),
    'field_timeframe_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1');
$handler->override_option('pane_title', '');
$handler->override_option('pane_description', '');
$handler->override_option('pane_category', array(
  'name' => 'View panes',
  'weight' => 0,
));
$handler->override_option('allow', array(
  'use_pager' => 'use_pager',
  'items_per_page' => 'items_per_page',
  'offset' => 0,
  'link_to_view' => 0,
  'more_link' => 'more_link',
  'path_override' => 0,
  'title_override' => 'title_override',
  'exposed_form' => FALSE,
));
$handler->override_option('argument_input', array());
$handler->override_option('link_to_view', 0);
$handler->override_option('inherit_panels_path', 0);

CCK datetime for 'Event'

$content['type']  = array (
  'name' => 'Event',
  'type' => 'event',
  'description' => 'Store upcoming events which integrate into your calendar.',
  'title_label' => 'Event',
  'body_label' => '',
  'min_word_count' => '0',
  'help' => '',
  'node_options' => 
  array (
    'status' => true,
    'promote' => true,
    'sticky' => false,
    'revision' => false,
  ),
  'flag_bookmarks_default' => 0,
  'old_type' => 'event',
  'orig_type' => '',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'rdf_schema_class' => '',
  'comment' => '2',
  'comment_default_mode' => '4',
  'comment_default_order' => '1',
  'comment_default_per_page' => '50',
  'comment_controls' => '0',
  'comment_anonymous' => 0,
  'comment_subject_field' => '1',
  'comment_preview' => '0',
  'comment_form_location' => '1',
  'file_attach_node' => '0',
  'file_attach_comment' => '0',
  'notifications_node_ui' => 
  array (
    'links' => true,
    'block' => true,
    0 => 1,
    'form' => false,
    'comment' => false,
    'teaserlinks' => false,
    'subform' => false,
  ),
  'notifications_content_type' => 
  array (
    'thread' => true,
    'nodetype' => true,
    'author' => true,
    'typeauthor' => false,
  ),
  'vertical_tabs_fieldsets' => 
  array (
    'menu' => true,
    'author' => true,
    'revision_information' => true,
    'options' => true,
    'comment_settings' => true,
    'group_eventreference' => false,
    'notifications' => false,
    'flag' => false,
    'path' => false,
  ),
);
$content['fields']  = array (
  0 => 
  array (
    'label' => 'Time Frame',
    'field_name' => 'field_timeframe',
    'type' => 'datetime',
    'widget_type' => 'date_popup',
    'change' => 'Change basic information',
    'weight' => '-2',
    'default_value' => 'blank',
    'default_value2' => 'same',
    'default_value_code' => '',
    'default_value_code2' => '',
    'input_format' => 'm/d/Y - H:i',
    'input_format_custom' => '',
    'year_range' => '-3:+3',
    'increment' => '5',
    'advanced' => 
    array (
      'label_position' => 'above',
      'text_parts' => 
      array (
        'year' => 0,
        'month' => 0,
        'day' => 0,
        'hour' => 0,
        'minute' => 0,
        'second' => 0,
      ),
    ),
    'label_position' => 'above',
    'text_parts' => 
    array (
    ),
    'description' => '',
    'group' => false,
    'required' => 0,
    'multiple' => '0',
    'repeat' => 0,
    'todate' => 'optional',
    'granularity' => 
    array (
      'year' => 'year',
      'month' => 'month',
      'day' => 'day',
      'hour' => 'hour',
      'minute' => 'minute',
    ),
    'default_format' => 'long',
    'tz_handling' => 'site',
    'timezone_db' => 'UTC',
    'op' => 'Save field settings',
    'module' => 'date',
    'widget_module' => 'date',
    'columns' => 
    array (
      'value' => 
      array (
        'type' => 'datetime',
        'not null' => false,
        'sortable' => true,
        'views' => true,
      ),
      'value2' => 
      array (
        'type' => 'datetime',
        'not null' => false,
        'sortable' => true,
        'views' => false,
      ),
    ),
    'rdf_property_from' => '',
    'rdf_property_to' => '',
    'display_settings' => 
    array (
      'label' => 
      array (
        'format' => 'above',
        'exclude' => 0,
      ),
      'teaser' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'full' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      4 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      2 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      3 => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'token' => 
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
    ),
  ),
);
$content['extra']  = array (
  'title' => '-5',
  'menu' => '0',
  'taxonomy' => '-4',
);

Let me know if there is anything else I can supply.

karens’s picture

@mikestefff, it looks like you had the same problem and yours is also fixed by the commits I just made.

I now have all filter types working, select, text, and popup, and I'm just going through and testing various combinations of default values and exposed and non-exposed filters to try to be sure all combinations are working.

karens’s picture

Status: Active » Fixed

I think I have found all the problems and have this working right. I just made these fixes, they are not in the tarball on the project page yet and they are not in the 2.1 version. They are in cvs for the -dev version and will be in tomorrow's -dev tarball, so please don't reopen this issue to report it is not fixed unless you are really really sure you are using the code that has today's fixes in it.

jdanthinne’s picture

Status: Fixed » Active

I think it's not fixed.
Now I can see all the nodes when I first load the view or if I don't select anything, BUT if I select a year, and not a month (granulary of my filter is set to month), I only see the results for january of the selected year.

$view = new view;
$view->name = 'Editos';
$view->description = '';
$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', 'Paramètres par défaut', 'default');
$handler->override_option('fields', array(
  'field_image_fid' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'carre80x80_linked',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_image_fid',
    'table' => 'node_data_field_image',
    'field' => 'field_image_fid',
    'relationship' => 'none',
  ),
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Supplanter',
    ),
  ),
  'name' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_taxonomy' => 0,
    'exclude' => 0,
    'id' => 'name',
    'table' => 'term_data',
    'field' => 'name',
    'override' => array(
      'button' => 'Supplanter',
    ),
    'relationship' => 'none',
  ),
  'field_date_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_date_value',
    'table' => 'node_data_field_date',
    'field' => 'field_date_value',
    'relationship' => 'none',
  ),
  'field_chapeau_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_chapeau_value',
    'table' => 'node_data_field_chapeau',
    'field' => 'field_chapeau_value',
    'relationship' => 'none',
  ),
  'view_node' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'text' => 'Lire la suite',
    'exclude' => 0,
    'id' => 'view_node',
    'table' => 'node',
    'field' => 'view_node',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'field_date_value' => array(
    'order' => 'DESC',
    'delta' => -1,
    'id' => 'field_date_value',
    'table' => 'node_data_field_date',
    'field' => 'field_date_value',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'vid' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(
      'count' => 1,
      'override' => 0,
      'items_per_page' => '25',
    ),
    'wildcard' => 'all',
    'wildcard_substitution' => 'Tous / Toutes',
    'title' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'id' => 'vid',
    'table' => 'vocabulary',
    'field' => 'vid',
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '2',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'action' => 0,
      'agenda' => 0,
      'article' => 0,
      'contact' => 0,
      'dossier' => 0,
      'dossier_en_images' => 0,
      'edito' => 0,
      'page' => 0,
      'parole' => 0,
      'telechargement' => 0,
      'video' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '2' => 0,
      '1' => 0,
    ),
    'validate_argument_type' => 'tid',
    'user_argument_type' => '',
    'restrict_user_roles' => 0,
    'user_roles' => array(),
    'validate_argument_php' => '',
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'edito' => 'edito',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => '=',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => '',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'date_filter_op',
      'identifier' => 'date_filter',
      'label' => 'Date',
      'optional' => 1,
      'remember' => 0,
    ),
    'date_fields' => array(
      'node_data_field_date.field_date_value' => 'node_data_field_date.field_date_value',
    ),
    'date_method' => 'OR',
    'granularity' => 'month',
    'form_type' => 'date_select',
    'default_date' => '',
    'default_to_date' => '',
    'year_range' => '-3:+0',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('title', 'Editos');
$handler->override_option('items_per_page', 1);
$handler->override_option('use_pager', '0');
$handler->override_option('use_more', 0);
$handler->override_option('style_options', array(
  'grouping' => '',
));
$handler->override_option('row_options', array(
  'inline' => array(
    'name' => 'name',
    'field_date_value' => 'field_date_value',
  ),
  'separator' => '-',
));
karens’s picture

Status: Active » Fixed

This problem is fixed. You are moving into the territory of a feature request. If you set up the filter for month granularity, it expects you to provide a year and a month, or no value. That is the way it is designed. You expect it to do something intelligent with partial information and it is not designed that way. I'm pretty sure there is already another issue requesting that. Let's don't further pollute an already complex and confusing issue with this.

mstef’s picture

Thanks for the work.

Is this the good version? http://drupal.org/node/263344

mstef’s picture

Nice work - works perfectly. Also seems to clear up some bugs with Calendar that have been driving myself and others crazy.

Thanks

phl3tch’s picture

I'm still having problems with this, though they're slightly different with the latest dev release. I've got a date filter on a related node, and when I load the view it throws a big ugly sql error and returns nothing:

Unknown column 'node_data_field_graduation.field_graduation_value' in 'where clause' query: SELECT COUNT(*) FROM (SELECT users.uid AS uid FROM users users INNER JOIN node node_users ON users.uid = node_users.uid AND node_users.type = 'userprofile' LEFT JOIN users_roles users_roles_value_0 ON users.uid = users_roles_value_0.uid AND users_roles_value_0.rid = 7 LEFT JOIN content_type_userprofile node_data_field_committed ON node_users.vid = node_data_field_committed.vid LEFT JOIN content_field_firstname node_data_field_firstname ON node_users.vid = node_data_field_firstname.vid LEFT JOIN content_field_lastname node_data_field_lastname ON node_users.vid = node_data_field_lastname.vid WHERE ((users_roles_value_0.rid = 7) AND (node_data_field_committed.field_committed_value IS NULL)) AND (DATE_FORMAT(STR_TO_DATE(node_data_field_graduation.field_graduation_value, '%Y-%m-%dT%T'), '%Y') = '2009') ) count_alias

Here's the view (field_graduation_value is the field in question):

$view = new view;
$view->name = 'player_search';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'users';
$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', 'Player Search', 'default');
$handler->override_option('relationships', array(
'content_profile_rel' => array(
'label' => 'Content Profile',
'required' => 1,
'type' => 'userprofile',
'id' => 'content_profile_rel',
'table' => 'users',
'field' => 'content_profile_rel',
'relationship' => 'none',
),
));
$handler->override_option('fields', array(
'uid' => array(
'label' => 'Uid',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_user' => 0,
'exclude' => 0,
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'relationship' => 'none',
),
'picture' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'picture',
'table' => 'users',
'field' => 'picture',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'field_firstname_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 1,
'id' => 'field_firstname_value',
'table' => 'node_data_field_firstname',
'field' => 'field_firstname_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_lastname_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 1,
'text' => '[field_firstname_value] [field_lastname_value]',
'make_link' => 1,
'path' => 'user/[uid]',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_lastname_value',
'table' => 'node_data_field_lastname',
'field' => 'field_lastname_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_graduation_value' => array(
'label' => 'High School Graduation Year',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'group' => TRUE,
),
'repeat' => array(
'show_repeat_rule' => '',
),
'fromto' => array(
'fromto' => 'both',
),
'exclude' => 0,
'id' => 'field_graduation_value',
'table' => 'node_data_field_graduation',
'field' => 'field_graduation_value',
'relationship' => 'content_profile_rel',
),
'field_primaryposition_value' => array(
'label' => 'Primary Position',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_primaryposition_value',
'table' => 'node_data_field_primaryposition',
'field' => 'field_primaryposition_value',
'relationship' => 'content_profile_rel',
),
'field_secondaryposition_value' => array(
'label' => 'Secondary Position',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_secondaryposition_value',
'table' => 'node_data_field_secondaryposition',
'field' => 'field_secondaryposition_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_highschool_value' => array(
'label' => 'High School',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'custom',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_highschool_value',
'table' => 'node_data_field_highschool',
'field' => 'field_highschool_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_gpa_value' => array(
'label' => 'GPA',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'us_1',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_gpa_value',
'table' => 'node_data_field_gpa',
'field' => 'field_gpa_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_satscore_value' => array(
'label' => 'SAT Score',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_satscore_value',
'table' => 'node_data_field_satscore',
'field' => 'field_satscore_value',
'relationship' => 'content_profile_rel',
),
'field_actscore_value' => array(
'label' => 'ACT',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'custom',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_actscore_value',
'table' => 'node_data_field_actscore',
'field' => 'field_actscore_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_travelteam_value' => array(
'label' => 'Travel Team',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'custom',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_travelteam_value',
'table' => 'node_data_field_travelteam',
'field' => 'field_travelteam_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_bat_hand_value' => array(
'label' => 'Bats',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_bat_hand_value',
'table' => 'node_data_field_bat_hand',
'field' => 'field_bat_hand_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_throwing_hand_value' => array(
'label' => 'Throws',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_throwing_hand_value',
'table' => 'node_data_field_throwing_hand',
'field' => 'field_throwing_hand_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_slapper_value' => array(
'label' => 'Slap Hitter',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_slapper_value',
'table' => 'node_data_field_slapper',
'field' => 'field_slapper_value',
'relationship' => 'content_profile_rel',
),
'field_badges_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => 1,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_badges_value',
'table' => 'node_data_field_badges',
'field' => 'field_badges_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('sorts', array(
'field_lastname_value' => array(
'order' => 'ASC',
'delta' => -1,
'id' => 'field_lastname_value',
'table' => 'node_data_field_lastname',
'field' => 'field_lastname_value',
'relationship' => 'content_profile_rel',
),
'field_firstname_value' => array(
'order' => 'ASC',
'delta' => -1,
'id' => 'field_firstname_value',
'table' => 'node_data_field_firstname',
'field' => 'field_firstname_value',
'relationship' => 'content_profile_rel',
),
));
$handler->override_option('arguments', array(
'null' => array(
'default_action' => 'ignore',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'node',
'validate_fail' => 'not found',
'must_not_be' => 0,
'id' => 'null',
'table' => 'views',
'field' => 'null',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'4' => 0,
'6' => 0,
'5' => 0,
'8' => 0,
'7' => 0,
'3' => 0,
'9' => 0,
),
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'university' => 'university',
'webform' => 0,
'product' => 0,
'ua_combine' => 0,
'showcase' => 0,
'masterlesson' => 0,
'bio' => 0,
'camp' => 0,
'coach_profile' => 0,
'event' => 0,
'flv' => 0,
'group_lesson' => 0,
'half_hour_lesson' => 0,
'home' => 0,
'hour_lesson' => 0,
'instructor_application' => 0,
'lesson' => 0,
'lesson_old' => 0,
'location' => 0,
'notification' => 0,
'page' => 0,
'pressrelease' => 0,
'showcase_participant' => 0,
'story' => 0,
'ua_combine_participant' => 0,
'university_application' => 0,
'userphoto' => 0,
'userprofile' => 0,
'uservideo' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_is_member' => 0,
'validate_argument_signup_status' => 'any',
'validate_argument_signup_node_access' => 0,
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'rid' => array(
'operator' => 'or',
'value' => array(
'7' => '7',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'rid',
'table' => 'users_roles',
'field' => 'rid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'reduce_duplicates' => 1,
),
'field_committed_value' => array(
'operator' => 'empty',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'case' => 1,
'id' => 'field_committed_value',
'table' => 'node_data_field_committed',
'field' => 'field_committed_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
'field_firstname_value' => array(
'operator' => 'contains',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_firstname_value_op',
'identifier' => 'field_firstname_value',
'label' => 'First Name contains',
'optional' => 1,
'remember' => 0,
),
'case' => 1,
'id' => 'field_firstname_value',
'table' => 'node_data_field_firstname',
'field' => 'field_firstname_value',
'relationship' => 'content_profile_rel',
),
'field_lastname_value' => array(
'operator' => 'contains',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_lastname_value_op',
'identifier' => 'field_lastname_value',
'label' => 'Last Name contains',
'optional' => 1,
'remember' => 0,
),
'case' => 1,
'id' => 'field_lastname_value',
'table' => 'node_data_field_lastname',
'field' => 'field_lastname_value',
'relationship' => 'content_profile_rel',
),
'field_badges_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_badges_value_many_to_one_op',
'identifier' => 'field_badges_value_many_to_one',
'label' => 'Badges',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'field_badges_value_many_to_one',
'table' => 'node_data_field_badges',
'field' => 'field_badges_value_many_to_one',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
'reduce_duplicates' => 0,
),
'field_primaryposition_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_primaryposition_value_many_to_one_op',
'identifier' => 'field_primaryposition_value_many_to_one',
'label' => 'Primary Position',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'field_primaryposition_value_many_to_one',
'table' => 'node_data_field_primaryposition',
'field' => 'field_primaryposition_value_many_to_one',
'relationship' => 'content_profile_rel',
'reduce_duplicates' => 0,
),
'field_throwing_hand_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_throwing_hand_value_many_to_one_op',
'identifier' => 'field_throwing_hand_value_many_to_one',
'label' => 'Throws',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'field_throwing_hand_value_many_to_one',
'table' => 'node_data_field_throwing_hand',
'field' => 'field_throwing_hand_value_many_to_one',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
'reduce_duplicates' => 0,
),
'field_bat_hand_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_bat_hand_value_many_to_one_op',
'identifier' => 'field_bat_hand_value_many_to_one',
'label' => 'Bats',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'field_bat_hand_value_many_to_one',
'table' => 'node_data_field_bat_hand',
'field' => 'field_bat_hand_value_many_to_one',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
'reduce_duplicates' => 0,
),
'field_slapper_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_slapper_value_many_to_one_op',
'identifier' => 'field_slapper_value_many_to_one',
'label' => 'Slap Hitter',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'field_slapper_value_many_to_one',
'table' => 'node_data_field_slapper',
'field' => 'field_slapper_value_many_to_one',
'relationship' => 'content_profile_rel',
'reduce_duplicates' => 0,
),
'field_state_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_state_value_many_to_one_op',
'identifier' => 'field_state_value_many_to_one',
'label' => 'State',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'field_state_value_many_to_one',
'table' => 'node_data_field_state',
'field' => 'field_state_value_many_to_one',
'relationship' => 'content_profile_rel',
'reduce_duplicates' => 0,
),
'date_filter' => array(
'operator' => '=',
'value' => array(
'value' => NULL,
'min' => NULL,
'max' => NULL,
'default_date' => '',
'default_to_date' => '',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'date_filter_op',
'identifier' => 'date_filter',
'label' => 'Graduation',
'optional' => 1,
'remember' => 0,
),
'date_fields' => array(
'node_data_field_graduation.field_graduation_value' => 'node_data_field_graduation.field_graduation_value',
),
'date_method' => 'OR',
'granularity' => 'year',
'form_type' => 'date_select',
'default_date' => '',
'default_to_date' => '',
'year_range' => '-0:+8',
'id' => 'date_filter',
'table' => 'node',
'field' => 'date_filter',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('title', 'Player Search');
$handler->override_option('empty', 'Sorry, there are no players that fit your search options.');
$handler->override_option('empty_format', '1');
$handler->override_option('use_pager', '1');
$handler->override_option('row_options', array(
'inline' => array(
'field_firstname_value' => 'field_firstname_value',
'field_lastname_value' => 'field_lastname_value',
),
'separator' => ' ',
));
$handler = $view->new_display('page', 'Page (tab)', 'page_1');
$handler->override_option('access', array(
'type' => 'role',
'role' => array(
'5' => 5,
),
));
$handler->override_option('items_per_page', 20);
$handler->override_option('path', 'node/%/player-search');
$handler->override_option('menu', array(
'type' => 'tab',
'title' => 'Player Search',
'description' => '',
'weight' => '1',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler = $view->new_display('page', 'Page', 'page_2');
$handler->override_option('path', 'player-search');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));

karens’s picture

There is another issue about problems with relationships, that's a whole different issue.

kenorb’s picture

What kind of issue with relationships?
There is some issue about that?
Because I think I've got this problem as well.

Status: Fixed » Closed (fixed)

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