Limit list to selected items doesn't work. I have a two-tier vocabulary and I want to limit the exposed filter select options to those items of a particular first-tier term. I have selected all of the terms that I want to show up in the select list, checked "Optional", "Force single" and "Limit list to selected items", but the full list still appears.

$view = new view;
$view->name = 'resource_library';
$view->description = 'Resource Library';
$view->tag = 'Resource Library';
$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',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'created' => array(
    'label' => 'Date posted',
    'date_format' => 'medium',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
  'changed' => array(
    'label' => 'Date updated',
    'date_format' => 'medium',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
  'field_public_description_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_public_description_value',
    'table' => 'node_data_field_public_description',
    'field' => 'field_public_description_value',
    'relationship' => 'none',
  ),
  'teaser' => array(
    'label' => '',
    'exclude' => 0,
    'id' => 'teaser',
    'table' => 'node_revisions',
    'field' => 'teaser',
    'relationship' => 'none',
  ),
  'view_node' => array(
    'label' => '',
    'text' => 'View resource >',
    'exclude' => 0,
    'id' => 'view_node',
    'table' => 'node',
    'field' => 'view_node',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'title' => array(
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
  ),
));
$handler->override_option('arguments', array(
  'tid' => array(
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'resource3' => 'resource3',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'tid_2' => array(
    'operator' => 'or',
    'value' => array(
      '50' => 50,
      '51' => 51,
      '52' => 52,
      '53' => 53,
      '54' => 54,
      '55' => 55,
      '56' => 56,
      '57' => 57,
      '58' => 58,
      '59' => 59,
      '60' => 60,
      '61' => 61,
      '62' => 62,
      '63' => 63,
      '64' => 64,
      '65' => 65,
      '66' => 66,
      '67' => 67,
      '68' => 68,
      '69' => 69,
      '70' => 70,
      '71' => 71,
      '284' => 284,
      '72' => 72,
      '285' => 285,
      '73' => 73,
      '286' => 286,
      '74' => 74,
      '76' => 76,
      '77' => 77,
      '78' => 78,
      '79' => 79,
      '81' => 81,
      '83' => 83,
      '84' => 84,
      '82' => 82,
      '85' => 85,
      '86' => 86,
      '87' => 87,
      '89' => 89,
      '88' => 88,
      '90' => 90,
      '91' => 91,
      '92' => 92,
      '93' => 93,
      '94' => 94,
      '95' => 95,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_2_op',
      'identifier' => 'category',
      'label' => 'Category:',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'vid' => '12',
    'id' => 'tid_2',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 1,
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'tid' => array(
    'operator' => 'or',
    'value' => array(
      '147' => 147,
      '283' => 283,
      '148' => 148,
      '149' => 149,
      '150' => 150,
      '151' => 151,
      '152' => 152,
      '153' => 153,
      '154' => 154,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_op',
      'identifier' => 'population',
      'label' => 'Applicable Population:',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'vid' => '14',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'tid_1' => array(
    'operator' => 'or',
    'value' => array(
      '96' => 96,
      '258' => 258,
      '259' => 259,
      '260' => 260,
      '261' => 261,
      '262' => 262,
      '263' => 263,
      '265' => 265,
      '264' => 264,
      '266' => 266,
      '267' => 267,
      '268' => 268,
      '269' => 269,
      '270' => 270,
      '271' => 271,
      '272' => 272,
      '273' => 273,
      '274' => 274,
      '275' => 275,
      '276' => 276,
      '277' => 277,
      '278' => 278,
      '279' => 279,
      '280' => 280,
      '281' => 281,
      '282' => 282,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_1_op',
      'identifier' => 'docutype',
      'label' => 'Document Type:',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'vid' => '1',
    'id' => 'tid_1',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'relationship' => 'none',
    'reduce_duplicates' => 0,
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'tid_3' => array(
    'operator' => 'or',
    'value' => array(),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'type' => 'textfield',
    'vid' => '12',
    'id' => 'tid_3',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('title', 'Resources');
$handler->override_option('empty', 'No resources in this category at this time.');
$handler->override_option('empty_format', '3');
$handler->override_option('items_per_page', 30);
$handler->override_option('use_pager', '1');
$handler->override_option('row_options', array(
  'inline' => array(
    'title' => 'title',
    'timestamp' => 'timestamp',
  ),
  'separator' => '',
));
$handler = $view->new_display('page', 'Library', 'page_1');
$handler->override_option('path', 'resources/library');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
));
$handler = $view->new_display('page', 'Training & Education', 'page_2');
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'resource3' => 'resource3',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'tid_3' => array(
    'operator' => 'or',
    'value' => array(
      '0' => '76',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'type' => 'textfield',
    'vid' => '12',
    'id' => 'tid_3',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'tid_2' => array(
    'operator' => 'or',
    'value' => array(
      '76' => 76,
      '77' => 77,
      '78' => 78,
      '79' => 79,
      '81' => 81,
      '83' => 83,
      '84' => 84,
      '82' => 82,
      '85' => 85,
      '86' => 86,
      '87' => 87,
      '89' => 89,
      '88' => 88,
      '90' => 90,
      '91' => 91,
      '92' => 92,
      '93' => 93,
      '94' => 94,
      '95' => 95,
      '50' => 0,
      '51' => 0,
      '52' => 0,
      '53' => 0,
      '54' => 0,
      '55' => 0,
      '56' => 0,
      '57' => 0,
      '58' => 0,
      '59' => 0,
      '60' => 0,
      '61' => 0,
      '62' => 0,
      '63' => 0,
      '64' => 0,
      '65' => 0,
      '66' => 0,
      '67' => 0,
      '68' => 0,
      '69' => 0,
      '70' => 0,
      '71' => 0,
      '284' => 0,
      '72' => 0,
      '285' => 0,
      '73' => 0,
      '286' => 0,
      '74' => 0,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_2_op',
      'identifier' => 'category',
      'label' => 'Category:',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'vid' => '12',
    'id' => 'tid_2',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 1,
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'tid' => array(
    'operator' => 'or',
    'value' => array(
      '147' => 147,
      '283' => 283,
      '148' => 148,
      '149' => 149,
      '150' => 150,
      '151' => 151,
      '152' => 152,
      '153' => 153,
      '154' => 154,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_op',
      'identifier' => 'population',
      'label' => 'Applicable Population:',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'vid' => '14',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
  'tid_1' => array(
    'operator' => 'or',
    'value' => array(
      '96' => 96,
      '258' => 258,
      '259' => 259,
      '260' => 260,
      '261' => 261,
      '262' => 262,
      '263' => 263,
      '265' => 265,
      '264' => 264,
      '266' => 266,
      '267' => 267,
      '268' => 268,
      '269' => 269,
      '270' => 270,
      '271' => 271,
      '272' => 272,
      '273' => 273,
      '274' => 274,
      '275' => 275,
      '276' => 276,
      '277' => 277,
      '278' => 278,
      '279' => 279,
      '280' => 280,
      '281' => 281,
      '282' => 282,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_1_op',
      'identifier' => 'docutype',
      'label' => 'Document Type:',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'vid' => '1',
    'id' => 'tid_1',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'relationship' => 'none',
    'reduce_duplicates' => 0,
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('title', 'Training & Education');
$handler->override_option('path', 'resources/training-and-education');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
));

Comments

merlinofchaos’s picture

That view is pretty complex, with two different page displays and multiple exposed filters. Only one of the displays appears to actually have a reduced set of filters to display, and you didn't specify which filter exactly you're having an issue with.

Also, Views 2.2 is out, you really should update before filing bugs against Views 2.1. How do you know your bug wasn't fixed in the next version?

capellic’s picture

Version: 6.x-2.1 » 6.x-2.2
StatusFileSize
new17.88 KB
new47.06 KB

Thanks for your speedy response, and sorry not being up on 2.2, but I read the release notes and didn't see anything in there that spoke to my issue. But then I'm sure that there are many more tweaks and fixes that aren't in a release note.

I upgraded to 2.2 and the issue is still there.

Only one of the displays appears to actually have a reduced set of filters to display, and you didn't specify which filter exactly you're having an issue with.

The issue is with the Training & Education display.

I have added some other exposed filters to this view since last night and observed a couple of things that might be of interest.

1. I have several taxonomy fields and they all have this problem.

2. I have a CCK Text field (with a Select list widget) and I DON'T have this issue. If it isn't checked, it doesn't appear as a value in the exposed filter.

You can see that in the two screenshots I have uploaded where I have "Planning" as un-checked, but it still shows up as a value in the exposed filter for Category.

Thank you for your time.

merlinofchaos’s picture

You have two different exposed filters named 'Category:' in the View. One that is used in the default display (and thus every display except the other one) and one that is only in the display for 'Training & Education'.

Your image doesn't tell me which display you were looking at at the time.

merlinofchaos’s picture

You have two different exposed filters named 'Category:' in the View. One that is used in the default display (and thus every display except the other one) and one that is only in the display for 'Training & Education'.

Your image doesn't tell me which display you were looking at at the time.

There are also a bunch of fields around that filter that are clearly not part of the exposed filter set. I don't understand what's happening there.

capellic’s picture

StatusFileSize
new108.82 KB
new11.15 KB

Sorry for the confusion, let's take it from the top.

I have been able to reproduce the same error on another, much simpler view. There is only one exposed filter and it is of a taxonomy field. There are two displays - default and Page. I am working with the Page display.

I have uploaded two screenshots that can hopefully shed some light on what I am seeing.

$view = new view;
$view->name = 'news';
$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', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'field_site_ref_nid' => array(
    'label' => 'Site Name',
    'required' => 0,
    'delta' => -1,
    'id' => 'field_site_ref_nid',
    'table' => 'node_data_field_site_ref',
    'field' => 'field_site_ref_nid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'title_1' => array(
    'label' => '',
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title_1',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'field_news_date_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'long',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_news_date_value',
    'table' => 'node_data_field_news_date',
    'field' => 'field_news_date_value',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_teaser_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_teaser_value',
    'table' => 'node_data_field_teaser',
    'field' => 'field_teaser_value',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'view_node' => array(
    'label' => '',
    'text' => 'Read article >',
    'exclude' => 0,
    'id' => 'view_node',
    'table' => 'node',
    'field' => 'view_node',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_source_link_url' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'plain',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_source_link_url',
    'table' => 'node_data_field_source_link',
    'field' => 'field_source_link_url',
    'relationship' => 'none',
  ),
  'edit_node' => array(
    'label' => '',
    'text' => 'Edit >',
    'exclude' => 0,
    'id' => 'edit_node',
    'table' => 'node',
    'field' => 'edit_node',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'delete_node' => array(
    'label' => '',
    'text' => 'delete >',
    'exclude' => 0,
    'id' => 'delete_node',
    'table' => 'node',
    'field' => 'delete_node',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'title' => array(
    'label' => '',
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_site_city_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_site_city_value',
    'table' => 'node_data_field_site_city',
    'field' => 'field_site_city_value',
    'relationship' => 'field_site_ref_nid',
  ),
  'field_site_state_id_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_site_state_id_value',
    'table' => 'node_data_field_site_state_id',
    'field' => 'field_site_state_id_value',
    'relationship' => 'field_site_ref_nid',
  ),
  'field_site_ref_nid' => array(
    'label' => 'Site',
    'link_to_node' => 0,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_site_ref_nid',
    'table' => 'node_data_field_site_ref',
    'field' => 'field_site_ref_nid',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'field_news_date_value' => array(
    'order' => 'DESC',
    'id' => 'field_news_date_value',
    'table' => 'node_data_field_news_date',
    'field' => 'field_news_date_value',
    'override' => array(
      'button' => 'Override',
    ),
    '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(
      'news_story' => 'news_story',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'tid' => array(
    'operator' => 'or',
    'value' => array(
      '29' => 29,
      '28' => 0,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_op',
      'identifier' => 'format',
      'label' => 'Format:',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'vid' => '9',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('title', 'News');
$handler->override_option('empty', 'There is no content to meet your request.');
$handler->override_option('empty_format', '3');
$handler->override_option('items_per_page', 20);
$handler->override_option('use_pager', '1');
$handler->override_option('row_options', array(
  'inline' => array(
    'field_news_date_value' => 'field_news_date_value',
    'field_teaser_value' => 'field_teaser_value',
  ),
  'separator' => ' - ',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'news');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
));
zet’s picture

I confirm this error

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

This is crazy but I can't get my system to behave this way. I import the view, get rid of the fields I don't have, reset the vocabulary to one I do have and try this...and it works exactly correctly.

Toddv’s picture

Using current releases of all pertinent modules I can confirm the problem (exposed filters don't limit the list as expected) but also that I was able to "fix" the problem.

I had a rather complicated view that was one display on a view with four other page displays. So I cloned the view, removed all but the display I want to limit the exposed filter list on, and saved the view.

Now the list is limited to just the filters I want. Worked for me...

I did have to go back and forth a few times between the original display and the clone as the clone had pages with paths that led back to the original when I attempted to edit the display.

Merlinofchaos - Thanks for all your work.
TV

perandre’s picture

Version: 6.x-2.2 » 6.x-2.3

I confirm this bug using exposed filter with Taxonomy: Term.

I tried to simplify by cloning and removing all other displays, but in the dropdown I still get all terms in the selected vocabulary even though "Limit list to selected items" is checked.

perandre’s picture

Version: 6.x-2.3 » 6.x-2.5

Bug still applies with Views 2.5.
Here's an export:

$view = new view;
$view->name = 'Butikker';
$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', 'Butikker', 'default');
$handler->override_option('fields', array(
  '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',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_tlf_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' => 0,
    'id' => 'field_tlf_value',
    'table' => 'node_data_field_tlf',
    'field' => 'field_tlf_value',
    'relationship' => 'none',
  ),
  'tid' => 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,
    ),
    'type' => 'separator',
    'separator' => '',
    'empty' => '',
    'link_to_taxonomy' => 0,
    'limit' => 1,
    'vids' => array(
      '2' => 2,
      '1' => 0,
      '3' => 0,
      '4' => 0,
    ),
    'exclude' => 0,
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'title' => array(
    'order' => 'ASC',
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'butikk' => 'butikk',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'tid_2' => array(
    'operator' => 'or',
    'value' => array(
      '5' => 5,
      '4' => 4,
      '3' => 3,
      '39' => 39,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_2_op',
      'identifier' => 'til',
      'label' => 'Til ',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'vid' => '3',
    'id' => 'tid_2',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'relationship' => 'none',
    'reduce_duplicates' => 0,
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'tid' => array(
    'operator' => 'or',
    'value' => array(
      '305' => 305,
      '29' => 29,
      '22' => 22,
      '6' => 6,
      '30' => 30,
      '23' => 23,
      '24' => 24,
      '31' => 31,
      '26' => 0,
      '304' => 0,
      '303' => 0,
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_op',
      'identifier' => 'bransje',
      'label' => 'Bransje',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 1,
    ),
    'type' => 'select',
    'limit' => TRUE,
    'vid' => '1',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'title' => 'title',
    'field_tlf_value' => 'field_tlf_value',
    'tid' => 'tid',
  ),
  'info' => array(
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'field_tlf_value' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'tid' => array(
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler = $view->new_display('page', 'Finn en butikk', 'page_1');
$handler->override_option('path', 'butikker');
$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 = $view->new_display('block', 'Spisesteder', 'block_1');
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'butikk' => 'butikk',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'tid' => array(
    'operator' => 'or',
    'value' => array(
      '26' => 26,
      '352' => 352,
      '305' => 0,
      '29' => 0,
      '304' => 0,
      '22' => 0,
      '6' => 0,
      '303' => 0,
      '30' => 0,
      '27' => 0,
      '23' => 0,
      '24' => 0,
      '31' => 0,
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'type' => 'select',
    'limit' => TRUE,
    'vid' => '1',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
esmerel’s picture

Status: Postponed (maintainer needs more info) » Active
perandre’s picture

Version: 6.x-2.5 » 6.x-2.6

Any news on this? Issue prevails in 2.6.

clarkburbidge’s picture

StatusFileSize
new2.11 KB

I can also confirm this issue in 2.6

harrisben’s picture

I'm also seeing this with 2.6

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

#13 is teasing us. There aren't even exposed filters in that view.

And I just can't make this happen on anything I try. :/

perandre’s picture

StatusFileSize
new1.5 KB

I haven't managed to recreate the issue from scratch, but I have re-imported the attached view to find the same issue. No clue why...

perandre’s picture

StatusFileSize
new1.5 KB

edit: double post.

held69’s picture

StatusFileSize
new2.96 KB

i can confirm this issue in 2.7

On my site it only occurs with exposed filter.

Just to be clear:
My 'node type filter' is set with: "limit list to selected items", only two node types are checked.

However after applying my 'exposed filter' which is set on 'Any': all the node types on my site (more then two) are listed.

perandre’s picture

Tried to recreate the bug in my sandbox using the attached view in #18, but it was ok. I've only had the issue with exposed taxonomy terms. Could it somehow be an issue with some non-views configs?

held69’s picture

i'm suprised!
I think there is a slight difference in the issue mentioned in the startup and my own.

Did you applied the exposed filter with 'any' selected?
Did you really only get the 'selected items(nodetypes) as a search result.

To state clear:
I selected two node types (lets say blogs and stories)in my nodetype filter and marked 'limit list to selected items'.
When i apply my exposed filter with 'any' selected:
I not only get blogs and stories as a search result but also pages, polls and all the other nodetypes available on my site.

I expect my search result to be limited to the list of selected node types which does not happen.

I am able to recreate this issue on two of my sites, that is with views 2.6 and 2.7.

I'm thinking of some none view configs.........do you have some in mind?

perandre’s picture

Tried an import with the view in #18 on another test site with tons of modules enabled; still no bug (latest d6 and views 2.7). No clue why...

perandre’s picture

StatusFileSize
new54.29 KB

Ah, didn't see your full post before I commented.

I see, what you mention here is another issue. In the select box, only the appropriate filter alternatives shows up (i.e. the selected node types), but the result list using < Any > lists all kinds of content types. Do I understand you correctly? See img.

perandre’s picture

-If that's the case, I think it's by design. You can filter by nodetype in addtion to the exposed filter, and you're good (if I understand you correctly).

The original issue is with the select box, which sometimes lists more alternatives than it should. With me, that has only happened with taxonomy:term.

held69’s picture

Yes this is exactly what i mean.

I would expect that 'any' in the exposed filter would give a search outcome that is limited to the "limited selected item list".
However i guess that 'any' does mean any contenttype on the site, regardless of the "limited selected item list".

It could very well be that it was made to act like this.

Thanks

harrisben’s picture

I can't imagine that it would be intended to work the way it is (ie 'any' ignoring selected filter). If it is, either a note should be added that 'Limit list to selected items' and 'Optional' are incompatible or one of them should be disabled depending upon what you've selected.

held69’s picture

I agree

maestrogeek’s picture

Version: 6.x-2.6 » 6.x-3.0-alpha2

Can confirm I have seen this in 6.x-30-alpha2.

I am seeing the Limit list to selected items setting being completely ignored when set. It appears to me that when set it in the UI it is not updating the view itself. I check this box, click Update, then return to the settings for the filter, and the setting is unchecked again.

I am seeing this in filters for both node types and taxonomy term with depth. Has any progress been made on this? Anyone come up with a workaround/fix?

Bilmar’s picture

There is a patch RTBC at #721358: unable to select "Limit list to selected items" that fixes this issue.

Regards

dawehner’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

So