not all taxonomy terms showing up in

lukathonic - May 8, 2007 - 17:34
Project:Views
Version:5.x-1.6
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:patch (code needs review)
Description

version 5.1

I'm using the view module / taxonomy to organize site content into a number of categories. When I am editing the view, some of the terms do not show up in the "add fields" drop down menu. (Taxonomy: Terms for FOO)

Right now it lists 8 terms, but there are 13 categories that should be listed. They are all applied to the same content type, but other than that the missing terms are diverse. Some allow freetagging, others don't.

Any idea why this might be?

#1

gmak - May 9, 2007 - 12:11

I am getting the same behaviour. I have two taxonomy term filters, each taxonomy has three terms. But, only two of the terms show up in the lists.

#2

yhager - May 14, 2007 - 18:14

I found out that the first term is deleted if the vocab is not required. The attached patch worked for me.

AttachmentSize
optional_vocab.patch501 bytes

#3

gmak - May 15, 2007 - 11:23

patch worked for me too. thanks yhager!

#4

yhager - May 15, 2007 - 11:34
Status:active» patch (code needs review)

#5

greggles - May 22, 2007 - 22:51

The patch failed for me but the bugfix worked, so I've rerolled it.

I'm not 100% sure this is the "right" way to do it, but it seems to work. It also seemed to introduce the side effect that my top term was selected, though that filter wasn't enforced.

#6

merlinofchaos - May 22, 2007 - 23:48

greggles: No patch attached.

#7

greggles - May 23, 2007 - 01:22

heh

AttachmentSize
optional_vocab_0.patch786 bytes

#8

yhager - May 24, 2007 - 15:22

Here's a revised patch, addressing the issue mentioned on comment #5.

AttachmentSize
optional_vocab.1.patch762 bytes

#9

yhager - May 24, 2007 - 15:48

Here's a revised patch, addressing the issue mentioned on comment #5.

AttachmentSize
optional_vocab.1_0.patch762 bytes

#10

yhager - May 24, 2007 - 15:50

Here's a revised patch, addressing the issue mentioned on comment #5.

AttachmentSize
optional_vocab.1_1.patch762 bytes

#11

z.stolar - June 11, 2007 - 06:01

For patchophobic, a temporary bypass can be to use the "Taxonomy: Term" filter which lists all the terms, in a big long list.

#12

z.stolar - June 12, 2007 - 08:30

The patch works for me with no visible side effects.
Thanks yhager.

#13

nterbogt - June 14, 2007 - 04:20

Just a quick question... can anyone tell me why the author deletes the first item in the first place?

#14

yched - June 14, 2007 - 11:27
Status:patch (code needs review)» patch (reviewed & tested by the community)

@nterbogt : the intent here is to remove the ' option that is present in taxonomy selectors for non-required vocabularies, but is not relevant in the views filters context. Then forgetting to check if the vocab actually is required or not is a typo / negligence, I guess :-)

Let's mark this RTBC

#15

ShutterFreak - June 14, 2007 - 19:34

Subscribing.

#16

merlinofchaos - June 15, 2007 - 19:34

yched meant to say <All> option but his < got eaten. =)

Yes, this patch is RTBC, I just need to get back around to this. Hopefully soon.

#17

jpsalter - June 15, 2007 - 19:46

I'm having this problem w/ 5.x-1.6-beta5 too. Should the Version of this issue be changed?

#18

yched - June 15, 2007 - 19:56
Version:5.x-1.0» 5.x-1.6-beta5
Component:Miscellaneous» User interface

It definitely should. This a 1.6 bug only, AFAIK.

#19

criz@drupal.org - June 19, 2007 - 17:40

also missed the first taxonomy term in my exposed filters (and in views admin forms). But this patch worked for me, many thx!

#20

budda - July 4, 2007 - 12:35

Solution worked for me. bang it into CVS.

#21

FiNeX - July 4, 2007 - 21:09

I've test the patch... the first term is still not visibile.

#22

dabro - July 5, 2007 - 17:40

The latest patch fixed my terms not showing up, Thanks

#23

tom friedhof - July 7, 2007 - 00:47

latest patch worked for me

#24

timothyf - July 10, 2007 - 22:45

To those of you who are reporting that this patch is not working, try emptying the cache_views table after applying the patch. That worked for me.

#25

txcrew - July 11, 2007 - 14:43

Latest patch also fixes this issue for me.

txcrew

#26

merlinofchaos - July 14, 2007 - 18:58
Status:patch (reviewed & tested by the community)» fixed

Finally committed to -dev. =)

#27

Anonymous - July 28, 2007 - 19:00
Status:fixed» closed

#28

Sara Adams - December 6, 2007 - 19:02
Status:closed» active

With 5.4, a fix in taxonomy was applied (http://drupal.org/node/180109). This means the first entry for optional filters does not have to be removed anymore. Attached a patch that establishes the wanted result.

Without this patch, the first taxonomy term doesn't show up, which is most definitely undesired behaviour.

AttachmentSize
patch.txt466 bytes

#29

merlinofchaos - December 7, 2007 - 23:50

This needs to be fixed so that it doesn't store the entire taxonomy tree in the views cache anyway.

#30

drupalprojects - April 27, 2008 - 09:36
Version:5.x-1.6-beta5» 5.x-1.6

I've used 1.6 and first term still won't show in terms list

#31

cghobbs - April 30, 2008 - 18:50

I'm using 1.6 and the above patch worked for me without any visual side effects. But like merlinofchaos mentions this may not be the right way to do it anyway.

#32

catch - April 30, 2008 - 23:03
Status:active» patch (code needs review)

Lots of duplicates of this so changing status back to patch to make it more visible.

#33

sagannotcarl - May 1, 2008 - 19:16
Status:patch (code needs review)» patch (reviewed & tested by the community)

Patch from #28 applies cleanly and solves the issue for me.

#34

xurizaemon - May 12, 2008 - 05:31

patch in comment #28 works fine for me

+1 for this being released

#35

catch - May 12, 2008 - 08:46
Status:patch (reviewed & tested by the community)» fixed

This patch is already committed, there just isn't an official release which includes it yet (because the 1.7 release depends on more than just this patch). I marked this back to a patch status to make it easier to find but that seems to be giving the impression that it needs testing/lobbying to get committed - so back to fixed I guess.

#36

tjharman - May 22, 2008 - 14:02

[edit: Ignore - I forgot to clear the views cache]

This isn't working for me, not even the patch in #28

I am using views-1.6 and Drupal 5.7

My Taxonomy Term has a space in it -> "Friends Only", would that be the problem?

Regards,
tim

#37

Anonymous (not verified) - June 5, 2008 - 14:15
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#38

activelyOUT - June 7, 2008 - 17:11

subscribing

#39

owahab - July 1, 2008 - 13:04
Status:closed» patch (code needs review)

The first term of a vocabulary that's not required still doesn't show up in Views. The committed patch didn't fix the problem.
Issue #180109: Only taxonomy term selected by default when there is only one broke the behavior of Views:

unset($form['#options'][0]);

AttachmentSize
views_taxonomy.inc_.patch657 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.