Skip to Navigation

Drupal: Fix for Disappearing Taxonomy Term in Views Filter

We've been using Drupal more and more here at Forum One. One of its nicer aspects is a web interface to some functionality we had for programmers in SyntaxCMS: the ability to set up a "view" of a content type, so that you only got, say, all blog posts tagged with "Environment." This is pretty powerful; it lets a savvy Internet user with no specific programming skills to set up lots of functionality by clicking a few widgets. One such user asked me what I thought was an odd question: "Any idea why one of my terms for the issue taxonomy isn't showing up in filter for a view?"

I checked, and sure enough, the first term was missing. It happened to be the longest term, and I immediately hypothesized some sort of character limit. So I tested it by shortening the term. No joy. I then wondered if there were any illegal words, so I tried eliminating "and" from the term. Still nothing. I began to suspect it something about the position or some permission around the term. I deleted and re-added the term. Still nothing.

At this point I tried adding a term that came alphabetically before the missing term. Success! All but the new term showed up. But now I had an extraneous term hanging around. Having eliminated configuration errors as a cause, I went to the Views module page, and made sure I had the latest released version for the version of Drupal I was using (5.7) (We make it a policy never to rely on beta or dev versions). I did (1.6 as of this writing). So I started looking at the bug list to find out if anyone had reported this issue--it certainly seemed big enough that someone ought to have noticed.

Lo and behold, I found this bug. Turns out it had been discovered in beta testing and a patch applied. But I was using the latest release version...reading further, I found out a change in the taxonomy module itself had obsoleted the fix and a new patch issued, tested, and committed to CVS. It is in the 1.7 pre-release versions, but as I mentioned before, we don't use pre-release software if any alternative is available. However, knowing the patch is applied in the next version siginificantly reduces the effects of applying the patch now. So now I have the patch applied and committed to my local repository for the site.

So if you're having problems with disappearing taxonomy terms when building out a view, the patch above should fix it for you for Drupal 5.7 and Views 1.6.