title: Drupal Views- Filtering by multiple taxonomy terms
body: <p>I have a View set up to display featured Article nodes. For each node there are 2 taxonomy vocabs to use. The first is 'Featured' with a term 'Yes'; the second is 'Section' with terms: Home, Info, Blog etc. If a node has the term Yes (Featured vocab) and the term Blog (Section vocab) then if you were to browse to domain.com/blog then you would see that featured content.</p>
  
  <p>The view is set up to accept the first argument in the url to determine which section of the site you are viewing (Views argument: Taxonomy term). This works as expected.</p>
  
  <p>Lastly, I am filtering by node type (Article) and then the taxonomy vocab (Featured) which is where my view is failing to return content. If I remove the taxonomy vocab filter it displays correctly for each section although it is displaying all Article nodes.</p>
  
  <p>Could the issue be that the argument and filter are different taxonomy vocabs?</p>
  
  <p>Here's the SQL query:</p>
  
  <pre><code>    SELECT node.nid AS nid,
      node.type AS node_type,
      node.vid AS node_vid,
      node_data_field_article_images.field_article_images_data AS node_data_field_article_images_field_article_images_data,
      node.title AS node_title,
      node.created AS node_created
      FROM node node 
      LEFT JOIN content_field_article_images node_data_field_article_images ON node.vid = node_data_field_article_images.vid
      LEFT JOIN term_node term_node ON node.vid = term_node.vid
      LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
      WHERE (node.status &lt;&gt; 0) AND (node.type in ('article')) AND (node_data_field_article_images.field_article_images_list &lt;&gt; 0) AND (term_data.vid in ('20')) AND (term_data.name = 'home')
      ORDER BY node_created DESC
  </code></pre>
  
  <p>Here's my view:</p>
  
  <pre><code>  $view = new view;
    $view-&gt;name = 'marquee_slideshow_dev';
    $view-&gt;description = 'Marquee on homepage and landing pages';
    $view-&gt;tag = '';
    $view-&gt;view_php = '';
    $view-&gt;base_table = 'node';
    $view-&gt;is_cacheable = FALSE;
    $view-&gt;api_version = 2;
    $view-&gt;disabled = FALSE; /* Edit this to true to make a default view disabled initially */
    $handler = $view-&gt;new_display('default', 'Defaults', 'default');
    $handler-&gt;override_option('fields', array(
      'title' =&gt; array(
        'label' =&gt; '',
        'alter' =&gt; array(
          'alter_text' =&gt; 0,
          'text' =&gt; '',
          'make_link' =&gt; 0,
          'path' =&gt; '',
          'link_class' =&gt; '',
          'alt' =&gt; '',
          'prefix' =&gt; '',
          'suffix' =&gt; '',
          'target' =&gt; '',
          'help' =&gt; '',
          'trim' =&gt; 0,
          'max_length' =&gt; '',
          'word_boundary' =&gt; 1,
          'ellipsis' =&gt; 1,
          'html' =&gt; 0,
          'strip_tags' =&gt; 0,
        ),
        'empty' =&gt; '',
        'hide_empty' =&gt; 0,
        'empty_zero' =&gt; 0,
        'link_to_node' =&gt; 0,
        'exclude' =&gt; 0,
        'id' =&gt; 'title',
        'table' =&gt; 'node',
        'field' =&gt; 'title',
        'relationship' =&gt; 'none',
        'override' =&gt; array(
          'button' =&gt; 'Override',
        ),
      ),
    ));
    $handler-&gt;override_option('sorts', array(
      'created' =&gt; array(
        'order' =&gt; 'DESC',
        'granularity' =&gt; 'second',
        'id' =&gt; 'created',
        'table' =&gt; 'node',
        'field' =&gt; 'created',
        'relationship' =&gt; 'none',
      ),
    ));
    $handler-&gt;override_option('arguments', array(
      'name' =&gt; array(
        'default_action' =&gt; 'default',
        'style_plugin' =&gt; 'default_summary',
        'style_options' =&gt; array(),
        'wildcard' =&gt; 'all',
        'wildcard_substitution' =&gt; 'All',
        'title' =&gt; '',
        'breadcrumb' =&gt; '',
        'default_argument_type' =&gt; 'php',
        'default_argument' =&gt; '',
        'validate_type' =&gt; 'none',
        'validate_fail' =&gt; 'not found',
        'glossary' =&gt; 0,
        'limit' =&gt; '0',
        'case' =&gt; 'lower',
        'path_case' =&gt; 'lower',
        'transform_dash' =&gt; 1,
        'add_table' =&gt; 0,
        'require_value' =&gt; 0,
        'id' =&gt; 'name',
        'table' =&gt; 'term_data',
        'field' =&gt; 'name',
        'validate_user_argument_type' =&gt; 'uid',
        'validate_user_roles' =&gt; array(
          '2' =&gt; 0,
          '7' =&gt; 0,
          '8' =&gt; 0,
          '4' =&gt; 0,
          '6' =&gt; 0,
          '5' =&gt; 0,
        ),
        'relationship' =&gt; 'none',
        'default_options_div_prefix' =&gt; '',
        'default_argument_fixed' =&gt; '',
        'default_argument_user' =&gt; 0,
        'default_argument_image_size' =&gt; '_original',
        'default_argument_php' =&gt; '$path = explode(\'/\', drupal_get_path_alias($_GET[\'q\']));
    $is_front = $_GET[\'q\'] == \'&lt;front&gt;\' || $_GET[\'q\'] == variable_get(\'site_frontpage\', \'&lt;front&gt;\');
    $arg0 = arg(0);
  
    if ($is_front) {
      return \'home\';
    } else if ($arg0 = \'node\' &amp;&amp; arg(1) != \'add\' &amp;&amp; arg(2) != \'edit\' &amp;&amp; arg(2) != \'delete\' &amp;&amp; $path[0] != \'\') {
      return $path[0];
    }
    ',
        'validate_argument_node_type' =&gt; array(
          'activitystream' =&gt; 0,
          'image' =&gt; 0,
          'contenttab' =&gt; 0,
          'content_about_fedex_content_page' =&gt; 0,
          'content_about_fedex_home_page' =&gt; 0,
          'content_about_fedex_landing_page' =&gt; 0,
          'content_access_article' =&gt; 0,
          'content_access_article_index' =&gt; 0,
          'content_access_content_page' =&gt; 0,
          'content_access_landing_page' =&gt; 0,
          'content_block' =&gt; 0,
          'content_case_study' =&gt; 0,
          'content_document' =&gt; 0,
          'content_event' =&gt; 0,
          'content_executive_viewpoint' =&gt; 0,
          'content_feature' =&gt; 0,
          'content_fedex_fact' =&gt; 0,
          'content_fedex_video_page' =&gt; 0,
          'content_great_place_to_work' =&gt; 0,
          'content_location' =&gt; 0,
          'content_opco_overview' =&gt; 0,
          'content_our_commitment_content_p' =&gt; 0,
          'content_our_commitment_landing_p' =&gt; 0,
          'content_region_overview' =&gt; 0,
          'content_resources' =&gt; 0,
          'content_sag' =&gt; 0,
          'content_small_business' =&gt; 0,
          'page' =&gt; 0,
          'slideshow_image' =&gt; 0,
          'story' =&gt; 0,
        ),
        'validate_argument_node_access' =&gt; 0,
        'validate_argument_nid_type' =&gt; 'nid',
        'validate_argument_vocabulary' =&gt; array(
          '14' =&gt; 0,
          '18' =&gt; 0,
          '17' =&gt; 0,
          '11' =&gt; 0,
          '10' =&gt; 0,
          '15' =&gt; 0,
          '9' =&gt; 0,
          '3' =&gt; 0,
          '16' =&gt; 0,
          '8' =&gt; 0,
          '5' =&gt; 0,
          '2' =&gt; 0,
          '7' =&gt; 0,
          '19' =&gt; 0,
          '1' =&gt; 0,
          '12' =&gt; 0,
          '13' =&gt; 0,
        ),
        'validate_argument_type' =&gt; 'tid',
        'validate_argument_transform' =&gt; 0,
        'validate_user_restrict_roles' =&gt; 0,
        'image_size' =&gt; array(
          '_original' =&gt; '_original',
          'thumbnail' =&gt; 'thumbnail',
          'preview' =&gt; 'preview',
          'icon' =&gt; 'icon',
        ),
        'validate_argument_php' =&gt; '',
        'override' =&gt; array(
          'button' =&gt; 'Override',
        ),
      ),
    ));
    $handler-&gt;override_option('filters', array(
      'status' =&gt; array(
        'operator' =&gt; '=',
        'value' =&gt; '1',
        'group' =&gt; '0',
        'exposed' =&gt; FALSE,
        'expose' =&gt; array(
          'operator' =&gt; FALSE,
          'label' =&gt; '',
        ),
        'id' =&gt; 'status',
        'table' =&gt; 'node',
        'field' =&gt; 'status',
        'relationship' =&gt; 'none',
      ),
      'type' =&gt; array(
        'operator' =&gt; 'in',
        'value' =&gt; array(
          'article' =&gt; 'article',
        ),
        'group' =&gt; '0',
        'exposed' =&gt; FALSE,
        'expose' =&gt; array(
          'operator' =&gt; FALSE,
          'label' =&gt; '',
        ),
        'id' =&gt; 'type',
        'table' =&gt; 'node',
        'field' =&gt; 'type',
        'relationship' =&gt; 'none',
      ),
      'vid' =&gt; array(
        'operator' =&gt; 'in',
        'value' =&gt; array(
          '20' =&gt; '20',
        ),
        'group' =&gt; '0',
        'exposed' =&gt; FALSE,
        'expose' =&gt; array(
          'operator' =&gt; FALSE,
          'label' =&gt; '',
        ),
        'id' =&gt; 'vid',
        'table' =&gt; 'term_data',
        'field' =&gt; 'vid',
        'relationship' =&gt; 'none',
      ),
    ));
    $handler-&gt;override_option('access', array(
      'type' =&gt; 'none',
    ));
    $handler-&gt;override_option('cache', array(
      'type' =&gt; 'none',
    ));
    $handler-&gt;override_option('empty_format', '3');
    $handler-&gt;override_option('items_per_page', 0);
    $handler-&gt;override_option('use_pager', 'mini');
    $handler-&gt;override_option('distinct', 0);
    $handler-&gt;override_option('style_options', array(
      'grouping' =&gt; '',
    ));
    $handler = $view-&gt;new_display('block', 'Home Page', 'block_1');
    $handler-&gt;override_option('block_description', '');
    $handler-&gt;override_option('block_caching', -1);
  </code></pre>