I have a standard list view with half a dozen filters including Node: Published, four exposed Taxonomy Vocabularies, and Taxonomy: Vocabulary Name. When I choose operator "Is One Of" and select multiple vocabularies, my list view displays multiple nodes - as many multiples as the node has terms, up to the maximum number of vocabularies I have selected for my filter.

Example: if three vocabularies are chosen in the Taxonomy: Vocabulary Name filter, a node with terms in all three vocabularies will display three times while a node with only two terms selected will show up only twice. (Fortunately, for now I am able to set up my vocabularies so that I can choose just one for my filter and get the results I'm after.)

Here's the export:

$view = new stdClass(); $view->name = 'mapview'; $view->description = 'View maps every which way'; $view->access = array ( ); $view->view_args_php = ''; $view->page = TRUE; $view->page_title = 'Browse Multiple Maps'; $view->page_header = ''; $view->page_header_format = '3'; $view->page_footer = ''; $view->page_footer_format = '3'; $view->page_empty = ''; $view->page_empty_format = '3'; $view->page_type = 'teaser'; $view->url = 'browsemaps'; $view->use_pager = TRUE; $view->nodes_per_page = '20'; $view->sort = array ( array ( 'tablename' => 'term_data', 'field' => 'weight', 'sortorder' => 'ASC', 'options' => '', ), array ( 'tablename' => 'book', 'field' => 'weight', 'sortorder' => 'ASC', 'options' => '', ), ); $view->argument = array ( ); $view->field = array ( array ( 'tablename' => 'node', 'field' => 'title', 'label' => '', 'handler' => 'views_handler_field_nodelink', 'defaultsort' => 'ASC', 'options' => 'link', ), array ( 'tablename' => 'node', 'field' => 'body', 'label' => '', 'handler' => 'views_handler_field_teaser', ), ); $view->filter = array ( array ( 'tablename' => 'node', 'field' => 'status', 'operator' => '=', 'options' => '', 'value' => '1', ), array ( 'tablename' => 'term_data', 'field' => 'vid', 'operator' => 'OR', 'options' => '', 'value' => array ( 0 => '5', 1 => '13', 2 => '8', ), ), array ( 'tablename' => 'node', 'field' => 'distinct', 'operator' => '=', 'options' => '', 'value' => array ( ), ), array ( 'tablename' => 'term_node_11', 'field' => 'tid', 'operator' => 'OR', 'options' => '', 'value' => array ( ), ), array ( 'tablename' => 'term_node_5', 'field' => 'tid', 'operator' => 'OR', 'options' => '', 'value' => array ( ), ), array ( 'tablename' => 'term_node_13', 'field' => 'tid', 'operator' => 'OR', 'options' => '', 'value' => array ( ), ), array ( 'tablename' => 'term_node_8', 'field' => 'tid', 'operator' => 'OR', 'options' => '', 'value' => array ( 0 => '79', ), ), ); $view->exposed_filter = array ( array ( 'tablename' => 'term_node_11', 'field' => 'tid', 'label' => 'Whose Maps?', 'optional' => '1', 'is_default' => '0', 'operator' => '1', 'single' => '0', ), array ( 'tablename' => 'term_node_5', 'field' => 'tid', 'label' => 'What Level?', 'optional' => '1', 'is_default' => '0', 'operator' => '1', 'single' => '0', ), array ( 'tablename' => 'term_node_13', 'field' => 'tid', 'label' => 'Which Parts?', 'optional' => '1', 'is_default' => '0', 'operator' => '1', 'single' => '0', ), array ( 'tablename' => 'term_node_8', 'field' => 'tid', 'label' => 'What Stage?', 'optional' => '1', 'is_default' => '0', 'operator' => '1', 'single' => '0', ), ); $view->requires = array(term_data, book, node, term_node_11, term_node_5, term_node_13, term_node_8); $views[$view->name] = $view;
CommentFileSizeAuthor
#1 cat_term.png909 bytest4him
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

t4him’s picture

FileSize
909 bytes

same issue. I have this:
Vocabulary-A
term-a
term-b
term-c
Vocabulary-B
term-d
term-e
term-f

So, i create several pages with Vocabulary-A | term-a | term-b
Vocabulary-A is set with Hierarchy: multiple and Multiple Select.

The view will display every instance of: (see attached)

Vocabulary-A with term-a as Vocabulary-A
Vocabulary-A with term-a as term-a
Vocabulary-A with term-b as Vocabulary-A
Vocabulary-A with term-b as term-b

So essentually It is presenting every itteration of the selected categories (vocabularies). Any help would be appreciated.
Thanks,
t4him

merlinofchaos’s picture

in the dev versions I made the DISTINCT filter more forceful. This'll go out in 1.3 but it probably needs some more testing because it could have other consequences.

merlinofchaos’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)