Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've created several views which have multiple taxonomy filters of the "Taxonomy: Terms for x" type. Recently I noticed that the first term in each vocabulary is always missing from the list of terms in the filter. I double-checked in the category admin area, and the terms are there, but in every case it's the first term in the vocabulary that's missing from the views filter.
Comment | File | Size | Author |
---|---|---|---|
#48 | views_taxonomy_missing_term_in_filter.patch | 708 bytes | dww |
#3 | views_taxonomy.inc_.patch | 652 bytes | jsenich |
Comments
Comment #1
pagaille CreditAttribution: pagaille commentedI just noticed the same issue. I have two filters, one for Years (2007-2010) and one for States (AK-WY). But the year filter starts with 2008 and the state filter starts with AL. There's no way to select 07 or AK (first terms in each vocab).
Comment #2
jsenich CreditAttribution: jsenich commentedI just ran into this as well after upgrading Drupal to 5.4/5.5. I think it has something to do with the changes to the taxonomy module.
Comment #3
jsenich CreditAttribution: jsenich commentedThis fixed it for me. It looks like in the changes to the taxonomy module from 5.3 to 5.4 they changed the array key for the blank option from 0 to '':
Comment #4
WiseTeck CreditAttribution: WiseTeck commentedThis patch also works for me. The change in taxonomy that make this patch required is from http://drupal.org/node/180109
Comment #5
westwesterson CreditAttribution: westwesterson commentedi had the same problem, this patch did the trick. Thanks
Comment #6
ju.ri CreditAttribution: ju.ri commentedthere is another serious problem resulting from http://drupal.org/node/180109
exposed filters are shown as "all", but results are filtered as "please select", resulting in no search results at all:
http://drupal.org/node/180109#comment-665927
this patch solves it: http://drupal.org/node/180109#comment-667864
please include it in an update.
Comment #7
vthirteen CreditAttribution: vthirteen commentedsubscribe
Comment #8
catchComment #9
catchhttp://drupal.org/node/142885 was duplicate.
Comment #10
isaac77 CreditAttribution: isaac77 commentedsubscribing. (just ran into the same issue. creating a dummy term and giving it a weight of -10 as a temporary workaround.)
Comment #11
cmillet1 CreditAttribution: cmillet1 commentedThe patch worked for me. Thanks to everyone for their quick responses here.
Comment #12
xav CreditAttribution: xav commentedWorked here too (I had to clear the views cache though).
Thanks !
Comment #13
hillaryneaf CreditAttribution: hillaryneaf commentedsubscribe
Comment #14
shariharan CreditAttribution: shariharan commentedUpgraded to 5.6 and the taxonomy is still missing first term. Do we have to wait till next release ?
Comment #15
catchsubru: once this goes in, it'll be in either views 5.x-1.x-dev or eventually 5.x-1.7 - a drupal core security/bugfix release broke views, subsequent releases won't unbreak it.
If you'd like to test the patch yourself, go to http://drupal.org/patch to get started.
Comment #16
catchhttp://drupal.org/node/210249 was duplicate.
Comment #17
matt_harrold CreditAttribution: matt_harrold commentedMy apologies for the duplicate issue (I posted http://drupal.org/node/210249). I searched but came up short.
It's great news that there is already a patch for this, many thanks clever developers.
The exposed filters now work as they should, however, on the View editing form, the problem still appears to be there (missing the first term). It would only affect people who need to filter the view by the first term, but it is still a tiny bug hidden somewhere.
Comment #18
jsenich CreditAttribution: jsenich commentedI'm not having the issue on the View editing form after applying the patch. Have you tried clearing the cache after applying the patch?
Comment #19
jsenich CreditAttribution: jsenich commentedmerlinofchaos says that this patch masks a deeper problem so it will not be used.
Comment #20
merlinofchaos CreditAttribution: merlinofchaos commentedNo, it masks a deeper problem, not creates.
Please feel free to use this patch if it gets your site working. Just saying that I won't be committing it directly until I find the time to fix the underlying problem which is that taxonomy terms shouldn't be stored in the views cache *at all* and I'm an idiot and committed a patch that did without thinking about the ramifications.
Comment #21
jimbop CreditAttribution: jimbop commentedsubscribe
Comment #22
nschelly CreditAttribution: nschelly commentedsubscribe
-N
Comment #23
ram0135 CreditAttribution: ram0135 commentedSubscribing :)
Comment #24
Summit CreditAttribution: Summit commentedSubscribing.
greetings,
Martijn
Comment #25
idcm CreditAttribution: idcm commentedglad to hear it isn't just me. I tried the patch and it didn't work. However, I don't have access to my database right now so can't clear my cache - ggrrrrr. myphpadmin is not installed yet (out of my control) and the dba module isn't quite ready for D5.
forgive my ignorance about the "subscribing" posts. Does that mean you will notify these folks when it is fixed? Count me in if so.
thanks
c
Comment #26
jimbop CreditAttribution: jimbop commentedWhen you contribute to a topic (even by typing 'subscribe') you can track the issue in your drupal user account.
Comment #27
shawnpetriw CreditAttribution: shawnpetriw commented"When you contribute to a topic (even by typing 'subscribe') you can track the issue in your drupal user account."
I never knew that - count me as subscribed (and one who is creating a dummy term to reside at the top!)
PS - my pull-down menus now say - None Selected - as the default, "replacing" the first term (kicking it out of it's place?). It always used to say as default, with my list of terms below that.
Also, I only noticed this after upgrading to 5.6.
Finally the terms render properly at the node/add level, but don't show up in views correctly, in view or in edit view.
Comment #28
xav CreditAttribution: xav commentedidcm: you don't have to have access to the database to clear the cache. There's a button somewhere in the administration pages (in views I think), you just have to click it and voila !
Comment #29
catchBy the way just because there are more fundamental issues doesn't mean this patch won't fix this one. You'd be better off applying the patch on your sites (which is a very tiny fix) than making dummy terms etc.
Comment #30
merlinofchaos CreditAttribution: merlinofchaos commentedYes, I agree with catch. I am not going to commit this patch into the Views codebase, but if you are being hit by this problem by all means apply this patch.
Comment #31
jtjones23 CreditAttribution: jtjones23 commentedsubscribing
Comment #32
Dimegga CreditAttribution: Dimegga commentedsubscribing...
Comment #33
patrickfgoddard CreditAttribution: patrickfgoddard commentedsubscribe
Comment #34
mbria CreditAttribution: mbria commentedsubscribe
Comment #35
mbria CreditAttribution: mbria commentedsorry... I changed the title. :-(
rolling back to "Missing taxonomy...."
Comment #36
pyg77 CreditAttribution: pyg77 commentedsubscribing
Comment #37
syoumans CreditAttribution: syoumans commentedThis bug seems like a larger issue that what is being handled by the patch. I have an OPTIONAL taxonomy, and on the filter list, the terms show up as:
Term 1 is missing from this list.
When I apply the above patch, Term1 appears in the list, but the "- None selected -" item disappears from the list.
So right now I've commented out the unset() in (!$vocabulary->required()){ unset.... } and all the items seem to show up correctly. (Note that the none selected filter doesn't seem to be working for me, but I'm assuming that that is a separate issue.)
Did anyone else notice this?
(Drupal 5.6 / Views 5.x-1.6)
Comment #38
merlinofchaos CreditAttribution: merlinofchaos commentedThere is no "None selected" filter.
Comment #39
leo.ruffini CreditAttribution: leo.ruffini commentedsubscribe
Comment #40
seanburlington CreditAttribution: seanburlington commentedme too
applied patch, cleared cache - now it works :-)
Comment #41
gsquirrelsubscribe
Comment #42
frost CreditAttribution: frost commentedsubscribing
Comment #43
oskar_calvo CreditAttribution: oskar_calvo commentedI get it works with the patch.
Thanks.
oskar
Comment #44
rooey CreditAttribution: rooey commentedpatch fixed me up good.
Comment #45
vanvemdensubscribing. thanks for the patch.
Comment #46
Rollie CreditAttribution: Rollie commentedsubscribing
Comment #47
freakalis CreditAttribution: freakalis commentedsubscribing, please fix this :)
Comment #48
dwwJust ran into this myself. Other than the DOS line endings in patch #3, this solves the problem, and is clearly needed. Re-rolled to be a clean patch, and from the root of the views directory. Otherwise, it's the same (trivial) fix, so I'm setting this RTBC.
Comment #49
dwwSorry, whoops, I missed #20 above: http://drupal.org/node/199675#comment-701781
Anyway, this works around the problem for now. I'll see if I can spare any cycles on the underlying problem...
Comment #50
abe CreditAttribution: abe commentedsubscribing
Comment #51
momper CreditAttribution: momper commentedsubscribing
Comment #52
crandell CreditAttribution: crandell commentedsubscribing
Comment #53
bundes CreditAttribution: bundes commentedsubscribe
Comment #54
philray CreditAttribution: philray commentedsubscribing.
Comment #55
merlinofchaos CreditAttribution: merlinofchaos commentedplease stop subscribing to this issue. This issue has 30 subscribes which have now buried the patch.
there is no more to this issue.
use the patch.
Comment #56
WorldFallz CreditAttribution: WorldFallz commentedAt some point this was fixed-- current dev is now correct. Closing and locking again.