Bugs using cck_taxonomy fields in Views

apcal - October 27, 2007 - 18:46
Project:CCK Taxonomy Fields
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I found two problems when using cck_taxonomy fields in Views:

1 - exposed filter based on cck_taxonomy field does not work; whatever value you select on the exposed filter the Views display everything

2 - cck_taxonomy field passed as argument to a view must be passed by its tid and not the actual term, otherwise the argument does not filter anything; and even I pass the tid, argument substitution does not work (shows empty argument)

#1

cwells - November 5, 2007 - 22:52

I just ran into this myself. The solution to problem (1) is to add
'value-type' => 'array',
around line 230 of cck_taxonomy.module.

The problem is that with an OR operator but not having value-type set to be an array, the query generated is:
...your_field OR '7'
(which makes no sense at all, it's like not having that line in the query at all, ergo showing all results)

Rather than:
...your_field IN ('7')

.cw.

#2

Alan D. - December 19, 2007 - 03:08

Just a SVN patch for this issue.

AttachmentSize
patch.txt 700 bytes

#3

cgjohnson - December 20, 2007 - 16:41

I've downloaded cck_tax_ssu (super select ultra: http://drupal.org/project/cck_taxonomy_ssu), which combines CCK_taxonomy and Taxonomy_superselect. Do I need to install this patch? If so, can you tell a newbie how and where to install?

Thank you.

#4

SocialNicheGuru - April 19, 2008 - 19:11

OMG... this has been plaguing me for MONTHS! I can't believe it. You are so GREAT. I can't believe it. I have been searching all over Drupal for this solution- case in point, always come to the bug report.

I am SOOOOOOOOOO flipping GREATFUL!

Chris
activelyOUT

#5

xjs - September 29, 2008 - 03:58

Thanks! this works great!

 
 

Drupal is a registered trademark of Dries Buytaert.