I have two vocabularies that are assigned to the same content type.
V1 and V2
In Views I choose filtering methods of "is one of" Terms for V1 AND "is one of" Terms for V2.
My problem is that the frontend doesn't show any results.
I do have nodes that are assigned to both vocabularies with given terms.
Any help appreciated...

Comments

merlinofchaos’s picture

Hmm. I've got Views like this that are working. Can you export your view and paste it here?

erinc’s picture

Here it is:

  $view = new stdClass();
  $view->name = 'Sarı Sayfalar';
  $view->description = '';
  $view->access = array (
  0 => '3',
  1 => '1',
  2 => '2',
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Sarı Sayfalar';
  $view->page_header = '<a href=\"http://www.X.com/node/add/flexinode-1\">İşyerinizi ekleyin</a>';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'teaser';
  $view->url = 'sarisayfalar';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '15';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array (
  );
  $view->field = array (
  );
  $view->filter = array (
    array (
      'tablename' => 'term_node_3',
      'field' => 'tid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '2',
  1 => '4',
  2 => '3',
  3 => '12',
),
    ),
    array (
      'tablename' => 'term_node_6',
      'field' => 'tid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '14',
  1 => '16',
  2 => '15',
),
    ),
  );
  $view->requires = array(node, term_node_3, term_node_6);
  $views[$view->name] = $view;

erinc’s picture

I should have added that the nodes are flexinode.

telex4’s picture

Could it be related to this bug? I've got exposed filters and they're not working. Looking at the HTML views seems to be mucking up the form, but I'm not quite sure where in the code this is happening:

<select class="" name="edit[term_node_3.tid][value]" id="edit-term_node_3.tid-value" >

The rest of the form is fine, but that looks to me like the problem for me, and possibly related to your problem?

merlinofchaos’s picture

Does this bug still happen? I've fixed a couple of things that this may or may not have been related to, and I'm not sure.

benma’s picture

I just noticed that this has already been mentioned here - I posted a bug report about exactly the same problem some days ago here. This also concerns a flexinode, I haven't tested ordinary nodes.

To answer your question, the bug does still happen with the cvs version of views downloaded today. Using single filters works ok (except for that 'all' will retunr no results), so currently I'm using several views (one for each filter) as a workaround, but of course it would be a lot more userfriendly and elegant to be able to stack multiple filters...

Ben.

merlinofchaos’s picture

I believe I figured this one out. It is fixed in HEAD.

merlinofchaos’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
benma’s picture

Version: » 4.7.x-1.x-dev
Status: Closed (fixed) » Active

I just updated to 4.7.2 and the current version of views. Now I've got this problem again...

Ben.

asparagus’s picture

Category: support » bug
Priority: Normal » Critical

I'm also having a similar issue. I was making views for different content and all of the sudden things went a bit haywire [ ie one view showing content from the other ]. I deleted all views and completely reinstalled the module, however, i cannot choose 'is one of' from a selection in a second taxonomy. i've determined that if i do a 'is all of' before a 'is one of' on taxonomy, it breaks. these are the two fews with exactly the same filters but in different orders. one works, the other doesn't!

filter one works:

  $view = new stdClass();
  $view->name = 'newsIndex_commercial';
  $view->description = 'News Index Page for Commercial';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '4';
  $view->page_footer = '';
  $view->page_footer_format = '4';
  $view->page_empty = '';
  $view->page_empty_format = '4';
  $view->page_type = 'list';
  $view->url = '';
  $view->use_pager = FALSE;
  $view->nodes_per_page = '10';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'created',
      'sortorder' => 'DESC',
      'options' => '',
    ),
  );
  $view->argument = array (
  );
  $view->field = array (
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'dynamic',
),
    ),
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'term_node_2',
      'field' => 'tid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '6',
  1 => '7',
),
    ),
    array (
      'tablename' => 'term_node_1',
      'field' => 'tid',
      'operator' => 'AND',
      'options' => '',
      'value' => array (
  0 => '1',
),
    ),
  );
  $view->requires = array(node, term_node_2, term_node_1);
  $views[$view->name] = $view;

BUT

This one does not

  $view = new stdClass();
  $view->name = 'newsIndex_commercial';
  $view->description = 'News Index Page for Commercial';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '4';
  $view->page_footer = '';
  $view->page_footer_format = '4';
  $view->page_empty = '';
  $view->page_empty_format = '4';
  $view->page_type = 'list';
  $view->url = '';
  $view->use_pager = FALSE;
  $view->nodes_per_page = '10';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'created',
      'sortorder' => 'DESC',
      'options' => '',
    ),
  );
  $view->argument = array (
  );
  $view->field = array (
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'dynamic',
),
    ),
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'term_node_1',
      'field' => 'tid',
      'operator' => 'AND',
      'options' => '',
      'value' => array (
  0 => '1',
),
    ),
    array (
      'tablename' => 'term_node_2',
      'field' => 'tid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '6',
  1 => '7',
),
    ),
  );
  $view->requires = array(node, term_node_1, term_node_2);
  $views[$view->name] = $view;

This seems to be a pretty substantial issue.

asparagus’s picture

That view seemed to work fine until i created a third view that filters for some other content using the same filter set but with a different term for one filter. Now BOTH views are showing the content of the second few. The second view works fine. And the first view works fine if the second one is deleted. No joke.

I've included the two views below. Each view has a seperate alias and there is no url set for either view as that seems to conflict with the alias.

VIEW ONE [ only works when view two doesn't exist ]

  $view = new stdClass();
  $view->name = 'newsIndex_commercial';
  $view->description = 'News Index Page for Commercial';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '4';
  $view->page_footer = '';
  $view->page_footer_format = '4';
  $view->page_empty = '';
  $view->page_empty_format = '4';
  $view->page_type = 'list';
  $view->url = '';
  $view->use_pager = FALSE;
  $view->nodes_per_page = '10';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'created',
      'sortorder' => 'DESC',
      'options' => '',
    ),
  );
  $view->argument = array (
  );
  $view->field = array (
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'dynamic',
),
    ),
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'term_node_2',
      'field' => 'tid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '6',
  1 => '7',
),
    ),
    array (
      'tablename' => 'term_node_1',
      'field' => 'tid',
      'operator' => 'AND',
      'options' => '',
      'value' => array (
  0 => '1',
),
    ),
  );
  $view->requires = array(node, term_node_2, term_node_1);
  $views[$view->name] = $view;

VIEW TWO [ always works but screws up view one ]

  $view = new stdClass();
  $view->name = 'commPropIndex_realty';
  $view->description = 'Realty Commercial Property Index Page';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '4';
  $view->page_footer = '';
  $view->page_footer_format = '4';
  $view->page_empty = '';
  $view->page_empty_format = '4';
  $view->page_type = 'list';
  $view->url = '';
  $view->use_pager = FALSE;
  $view->nodes_per_page = '10';
  $view->sort = array (
  );
  $view->argument = array (
  );
  $view->field = array (
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'dynamic',
),
    ),
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'term_node_2',
      'field' => 'tid',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => '8',
),
    ),
    array (
      'tablename' => 'term_node_1',
      'field' => 'tid',
      'operator' => 'AND',
      'options' => '',
      'value' => array (
  0 => '2',
),
    ),
  );
  $view->requires = array(node, term_node_2, term_node_1);
  $views[$view->name] = $view;

Any ideas on why this might be happening?

Thank you.

Aaron

merlinofchaos’s picture

Ugh. asparagus, your issue is not a similar issue. No wonder I couldn't find it.

You should file a separate report for this.

The vocabulary thing is gonna make me cry.

merlinofchaos’s picture

Status: Active » Fixed

K, asparagus, I tried to import those views, but neither of them are valid under current validating rules.

You have them both as 'list' types, but neither of them have fields. This is likely your problem.

If fixing this doesn't fix your issues, please open a new issue.

asparagus’s picture

hi merlinofchaos.

thank you again for the response.

i switched things and the situation isn't really solved. i'll go ahead and open up a new issue at http://drupal.org/node/72026

thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)