1

I'm maintaining a D6 project, where the customer wants to see a list of nodes where no taxonomy terms were added.

I want to solve this with views. I already tried some Filter settings for that, but nothing worked so far.

I would know the solution in D7 with Views 3 but in this case I can't get rid of this problem.

2

1 Answer 1

0

Try this: 1. create a node view 2. in 'Fields', add 'Node: nid' 3. in 'Relationships', add 'Taxonomy: Node' 4. in 'Filters', add 'Taxonomy: Vocabulary', in next step, choose 'Is empty (NULL)' as the operator. 5. test some of the nids given in the preview to see if they are the ones you are looking for, you might need to tweak a little the usage of relationship. Step #3 is here to give you extra operators to choose from.


update

Okay the above assumes the content type only has one term field, so nevermind... Now that I understand the issue better, I think you will probably need views_or module. Also we don't need 'relationship' anymore.

On my test Views, I use filter 'taxonomy:term(term id)' for each vocabulary, chain them together via Views_or. Set them to dropdown with hierarchy. Then highlight all terms in the vocab and check 'is none of' for the operator on the left. It's a very ugly query but that's the only way I got it to work...You'd better cache it for a better performance. I attached some screenshots hope to clarify the config part.

9
  • Thx for your answer! Unfortunately it doesn't work. maybe there is a problem because, in the node there is more than 1 vocabulary used?
    – themca
    Commented Jun 6, 2016 at 5:21
  • @themca hrm what kind of nodes does Views give you after you use the 'Is empty' filter? Still nodes with taxonomy terms? Would like to see the query if possible.
    – cchen
    Commented Jun 6, 2016 at 14:14
  • SELECT node.nid AS nid, node_term_node.nid AS node_term_node_nid, node.title AS node_title, node.type AS node_type, node.uid AS node_uid, node_revisions.format AS node_revisions_format, node.created AS node_created FROM node node LEFT JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN node node_term_node ON term_node.vid = node_term_node.vid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid WHERE (node.type in ('redaktionsrezept', 'rezept')) AND (term_data.vid IS NULL)
    – themca
    Commented Jun 7, 2016 at 5:07
  • There are no nodes, but there should be at least one (removed taxonomy terms manually)
    – themca
    Commented Jun 7, 2016 at 5:09
  • Query should be correct, I can't think of any problems... I suppose you get the same outcome when you don't include 'content type' in the filter? thanks.
    – cchen
    Commented Jun 10, 2016 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.