Active
Project:
CCK Taxonomy Fields
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 May 2009 at 17:34 UTC
Updated:
13 Aug 2009 at 18:37 UTC
Using this module with views is problematic and inconsistent if you are using the "Is none of" operator.
To reproduce:
With a multiple select CCK taxonomy field, assign at least one node two terms
Place a filter in a view calling that node with the "Is none of" operator and select only ONE of the two terms from that vocabulary. For this to glitch, you must select the "newer" term with the higher TID (lower in the list probably)
I have been trying to find a workaround for a couple of days now. This does NOT happen if I do it with standard taxonomy view (though I am slowly comparing the generated queries to find the bug). Any ideas?
Comments
Comment #1
fool2 commentedOkay, I've fixed this issue for myself but I'm not sure if it 1) breaks the rest of the operators or 2) will work for multiple fields
But for those of you who do run into this problem and need at least the start of a solution, I will post it below.
I got the original code from examining views_taxonomy's custom tid handler after seeing that it formed a much cleaner SQL query
First I reference a new handler in cck_taxonomy around line 229
NAMEOFFIELD is something like cck_taxonomy_field_*
NAMEOFCOLUMN is something like field_* and is the name of the cck column in the database (it should end with _tid in our case). There should be a way to find these automatically to make this work with multiple fields etc but I don't have the time or necessity to develop that right now.
Comment #2
fool2 commentedThis behavior is also present in the node reference CCK fields for views.