Aty first i though this was a categories bug; but then removed cats and re-tried just with taxonomy and same result. Possbily i just don't understand what filter is???
============
Description
I have been battling categories for weeks now and thought I would switch gears a bit and try views.
I think what I am trying is about the simplest example I could think of:
Images [container]
---- examples [category]
---- node 1 [category]
---- node 2 [category]
I added the above nodes and they all show up in my menu just fine.
I now try the 20 Steps to Views Happiness tutorial and basically do the following:
- add a view
- give it title, etc
- make a BLOCK view
- add a node:title field
- NO filters, NO args
- go to blocks and enable my new View Block
I now see my new block and sure enough the following titles appear:
• Images
• examples
• node 1
• node 2
BUT!!!
- go back to edit the view
- select to add filter: Tax – Vocab
- select All Of
- Images (my container) shows up in Value listing for the filter
- select Images
- SAVE
Now my block is empty
Seems pretty straight forward. Why does this not work.
Drupal 4.7.3.
Have now tried this both generic taxonomy module as well as cats module - same results (no results).
Peter Lindstrom
www.LiquidCMS.ca
Comments
Comment #1
liquidcms commentedfrom the view_view table i pulled out the 2 queries that get stored to try to figure out what is wrong with this.
for the record i have:
NO FILTER:
WITH TAX-VOCAB FILTER:
the 2nd query isnt valid as is; so i will need to go through code to see how it gets converted ({term_data}) into a real query.
Comment #2
liquidcms commentedComment #3
liquidcms commentedwell a little digging into the query that gets stored showed that the wrong query is indeed being built.
NOTE - this example is different that the one above... but similar
examples [category]
image 1
image 2
image 3
the relevant tables have the following data:
and the query that gets generated looks like:
which, will generate no results since there is no tid = 12 in the term_node table.
CAN SOMEONE PLEASE VERIFY THAT I SHOULD BE ABLE TO FILTER ON A CATEGORY/CONTAINER OR TERM/VOCAB?
thanks,
Comment #4
liquidcms commentedlooking at this a little it would seem that the term_node table is being built incorrectly:
rather than what i have above it should have:
for nid = 6, 7, 8
tid should be 12 to match with term_data[examples].tid = 12
not sure why views module makes tid = 1 rather than 12
Comment #5
liquidcms commentedtoo funny.. ok, i started this as a bug with the category module; but when i saw the problem with the original taxonomy module - i figured the issue must be with the view module
but now, in light of seeingthat the term_node table is wrong - it must again be the cat module or maybe the tax_wrapper - and maybe when i went back to the tax module it simply didnt fix the term_node table.
i iwll try gong back to tax module and re-saving my nodes and then move this BUG back to the category module
Comment #6
liquidcms commentedyes, using the original tax module and re-saving the image nodes; the term_node table is now built correctly and my view works as expected.
i have moved this BUG over to the category project: http://drupal.org/node/89171
Comment #7
merlinofchaos commentedSo, ah, this isn't a views bug?