Download & Extend

"Allow multiple terms per argument" doesn't work with term ID

Project:Views
Version:6.x-2.2
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Drupal version 6.6
Views 6.x-2.2

I want to create a page using two taxonomy terms as arguments. The path should look like: cc-de-breughel/term-of-first-vocabulary/thema/multiple-term-IDs-of-second-vocabulary. For the first argument I use the term, for the second the term ID. The terms in the first vocabulary use spaces which I replace by + in the URL. For the second argument I would like to combine multiple terms. When I check this option in the configuration of the argument, the view stops working and the second argument gives "uncategorized" as a result for every taxonomy term ID or combination of term IDs. Everything works fine when I haven't checked the "combine multiple terms"-option, but of course then I can only use one term ID.

I've been sweating on this for a couple of weeks now, but I can't seem to make it run. Any suggestions?

Query

I can't run a query in the live preview.

Export of the view

<?php

$view
= new view;
$view->name = 'event_thema';
$view->description = 'Events per thema';
$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(
 
'field_date_value' => array(
   
'label' => 'Datum',
   
'link_to_node' => 0,
   
'label_type' => 'widget',
   
'format' => 'default',
   
'multiple' => array(
     
'group' => 0,
     
'multiple_number' => '',
     
'multiple_from' => '',
     
'multiple_reversed' => 0,
    ),
   
'exclude' => 0,
   
'id' => 'field_date_value',
   
'table' => 'node_data_field_date',
   
'field' => 'field_date_value',
   
'relationship' => 'none',
   
'override' => array(
     
'button' => 'Override',
    ),
  ),
 
'title' => array(
   
'label' => '',
   
'link_to_node' => 1,
   
'exclude' => 0,
   
'id' => 'title',
   
'table' => 'node',
   
'field' => 'title',
   
'relationship' => 'none',
   
'override' => array(
     
'button' => 'Override',
    ),
  ),
 
'tid' => array(
   
'label' => '',
   
'type' => 'separator',
   
'separator' => ', ',
   
'empty' => '',
   
'link_to_taxonomy' => 1,
   
'limit' => 1,
   
'vids' => array(
     
'1' => 1,
     
'3' => 0,
     
'2' => 0,
     
'6' => 0,
     
'4' => 0,
    ),
   
'exclude' => 0,
   
'id' => 'tid',
   
'table' => 'term_node',
   
'field' => 'tid',
   
'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
 
'field_date_value' => array(
   
'order' => 'ASC',
   
'id' => 'field_date_value',
   
'table' => 'node_data_field_date',
   
'field' => 'field_date_value',
   
'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
 
'name' => array(
   
'default_action' => 'empty',
   
'style_plugin' => 'default_summary',
   
'style_options' => array(),
   
'wildcard' => 'all',
   
'wildcard_substitution' => 'Alle',
   
'title' => '%1',
   
'default_argument_type' => 'fixed',
   
'default_argument' => '',
   
'validate_type' => 'taxonomy_term',
   
'validate_fail' => 'not found',
   
'glossary' => 0,
   
'limit' => '0',
   
'case' => 'ucwords',
   
'path_case' => 'none',
   
'transform_dash' => 0,
   
'add_table' => 1,
   
'require_value' => 0,
   
'id' => 'name',
   
'table' => 'term_data',
   
'field' => 'name',
   
'relationship' => 'none',
   
'default_options_div_prefix' => '',
   
'default_argument_user' => 0,
   
'default_argument_fixed' => '',
   
'default_argument_php' => '',
   
'validate_argument_node_type' => array(
     
'blog' => 0,
     
'actor' => 0,
     
'arrangement' => 0,
     
'article' => 0,
     
'book' => 0,
     
'event' => 0,
     
'location' => 0,
     
'media' => 0,
     
'object' => 0,
     
'page' => 0,
     
'production' => 0,
     
'story' => 0,
    ),
   
'validate_argument_node_access' => 0,
   
'validate_argument_nid_type' => 'nid',
   
'validate_argument_vocabulary' => array(
     
'2' => 2,
     
'9' => 0,
     
'3' => 0,
     
'6' => 0,
     
'1' => 0,
     
'10' => 0,
     
'13' => 0,
     
'12' => 0,
     
'11' => 0,
    ),
   
'validate_argument_type' => 'name',
   
'validate_argument_php' => '',
   
'override' => array(
     
'button' => 'Override',
    ),
  ),
 
'tid' => array(
   
'default_action' => 'not found',
   
'style_plugin' => 'default_summary',
   
'style_options' => array(),
   
'wildcard' => 'all',
   
'wildcard_substitution' => 'Alle',
   
'title' => '%1 in thema\'s (%2)',
   
'default_argument_type' => 'fixed',
   
'default_argument' => '',
   
'validate_type' => 'none',
   
'validate_fail' => 'empty',
   
'break_phrase' => 1,
   
'add_table' => 1,
   
'require_value' => 0,
   
'reduce_duplicates' => 0,
   
'set_breadcrumb' => 0,
   
'id' => 'tid',
   
'table' => 'term_node',
   
'field' => 'tid',
   
'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(
     
'event' => 'event',
     
'blog' => 0,
     
'actor' => 0,
     
'arrangement' => 0,
     
'article' => 0,
     
'book' => 0,
     
'location' => 0,
     
'media' => 0,
     
'object' => 0,
     
'page' => 0,
     
'production' => 0,
     
'story' => 0,
    ),
   
'validate_argument_node_access' => 0,
   
'validate_argument_nid_type' => 'nid',
   
'validate_argument_vocabulary' => array(
     
'9' => 0,
     
'3' => 0,
     
'2' => 0,
     
'6' => 0,
     
'1' => 0,
     
'10' => 0,
     
'13' => 0,
     
'12' => 0,
     
'11' => 0,
    ),
   
'validate_argument_type' => 'tid',
   
'validate_argument_php' => '',
  ),
));
$handler->override_option('filters', array(
 
'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('header_format', '3');
$handler->override_option('header_empty', 0);
$handler->override_option('empty', 'Geen resultaten voor deze argumenten.');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 0);
$handler->override_option('distinct', 0);
$handler->override_option('style_options', array(
 
'grouping' => '',
));
$handler = $view->new_display('page', 'Pagina', 'page_1');
$handler->override_option('fields', array(
 
'title' => array(
   
'label' => '',
   
'link_to_node' => 1,
   
'exclude' => 0,
   
'id' => 'title',
   
'table' => 'node',
   
'field' => 'title',
   
'relationship' => 'none',
   
'override' => array(
     
'button' => 'Use default',
    ),
  ),
 
'field_title_value' => array(
   
'label' => '',
   
'link_to_node' => 1,
   
'label_type' => 'none',
   
'format' => 'default',
   
'multiple' => array(
     
'group' => TRUE,
     
'multiple_number' => '',
     
'multiple_from' => '',
     
'multiple_reversed' => FALSE,
    ),
   
'exclude' => 0,
   
'id' => 'field_title_value',
   
'table' => 'node_data_field_title',
   
'field' => 'field_title_value',
   
'override' => array(
     
'button' => 'Use default',
    ),
   
'relationship' => 'none',
  ),
 
'field_date_value' => array(
   
'label' => '',
   
'link_to_node' => 0,
   
'label_type' => 'widget',
   
'format' => 'default',
   
'multiple' => array(
     
'group' => 0,
     
'multiple_number' => '',
     
'multiple_from' => '',
     
'multiple_reversed' => 0,
    ),
   
'exclude' => 0,
   
'id' => 'field_date_value',
   
'table' => 'node_data_field_date',
   
'field' => 'field_date_value',
   
'relationship' => 'none',
   
'override' => array(
     
'button' => 'Override',
    ),
  ),
 
'teaser' => array(
   
'label' => '',
   
'exclude' => 0,
   
'id' => 'teaser',
   
'table' => 'node_revisions',
   
'field' => 'teaser',
   
'override' => array(
     
'button' => 'Use default',
    ),
   
'relationship' => 'none',
  ),
 
'tid' => array(
   
'label' => 'Thema',
   
'type' => 'separator',
   
'separator' => ', ',
   
'empty' => '',
   
'link_to_taxonomy' => 1,
   
'limit' => 1,
   
'vids' => array(
     
'1' => 1,
     
'9' => 0,
     
'3' => 0,
     
'2' => 0,
     
'6' => 0,
     
'4' => 0,
     
'7' => 0,
    ),
   
'exclude' => 0,
   
'id' => 'tid',
   
'table' => 'term_node',
   
'field' => 'tid',
   
'relationship' => 'none',
   
'override' => array(
     
'button' => 'Use default',
    ),
  ),
));
$handler->override_option('path', 'cc-de-breughel/%/thema/%');
$handler->override_option('menu', array(
 
'type' => 'none',
 
'title' => 'Kalender',
 
'weight' => '0',
 
'name' => 'menu-debreughel',
));
$handler->override_option('tab_options', array(
 
'type' => 'none',
 
'title' => '',
 
'weight' => 0,
));
?>

Comments

#1

Status:active» fixed

Because the term ID and term name are different arguments, they actually fail to work together. They need to be the same type to work. You might try utilizing the taxonomy term validator to convert the term name to a term ID.

#2

Doesn't work.

#3

Now it's working and I think because I changed the arguments to basic validation.

#4

Status:fixed» closed (fixed)

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