Taxonomy:Term filter values suddenly disappeared, view still takes them into account
| Project: | Views |
| Version: | 5.x-1.6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Since yesterday, the values for the filter "Taxonomy:Term" mysteriously disappeared. I guess it has to do with i18n.
eg
What I want: I want to filter on the terms Dog, Chien and Hund. When I use the "Taxonomy:Term for Animaltype" filter, the multilanguals terms were shown correctly, but views doesn't seem to use them (either ignoring or not showing the view at all or behaving unpredictable).
What I did: For that reason, I started using "Taxonomy:Term", which gives a long list of all categories, but always seemed to work.
The current problem: Yesterday, all values for "Taxonomy:Term" disappeared and only an empty field can be selected.
I have no clue what happened. The problem arised on the production site and is not present in development.
Thanks for all suggestions!

#1
Moving to localizer, hope this is the right queue, but sounds like not a views bug.
#2
I tend to get confused with the translation modules, but I use Locale and I18n, but not localizer as far as I know.
Attached is a screenshot of the problem: Taxonomy:Term filter in views is empty, whereas it should show all taxonomy terms in all languages.
#3
Moving this here, because if it doesn't belong to views, it's likely related to i18n. Hope this is correct.
#4
Based on feedback in the forums at http://drupal.org/node/161863 , I'm moving this to Taxonomy Image. I use 5.x-1.0-beta1 with a patch that makes it easier to attach images.
#5
Two things to start with: please upgrade to the latest release; then read the other issue related to this (http://drupal.org/node/239621) for some code to remove.
#6
I tried the upgrade in my test environment and several long sql errors appeared. I was wondering if it's actually possible to do this upgrade when using version 5.x-1.0-beta1 with this patch: http://drupal.org/node/197369#5 . Thanks already for all help, I'm happy to see that there's an actual known cause for this empty Taxonomy:All terms behavior.
#7
I don't think you should use that patch. What kinds of SQL errors do you get? That's something that definitely needs to be addressed. The -dev version should have all the SQL errors that I know about fixed. The Views problem hasn't been fixed yet because I'm waiting on someone who's more expert than I.
#8
I've started all over to ensure to have an exact copy of my production site.
1. I disabled and uninstalled Taxonomy Image 5.x-1.0-beta1
2. I installed the latest version of Taxonomy Image
3. I removed the following code from the Taxonomy Image module:
$tables['term_node'] = array(
'name' => 'term_node',
'join' => array(
'left' => array(
'table' => 'node',
'field' => 'nid'
),
'right' => array(
'field' => 'nid'
)
),
);
Result: the filter "Taxonomy:All Terms" still wasn't there and only the white empty box was shown. The views that are using this filter (every single one on my site), still work correctly. However, it's not possible to change them because you are prompted to give a value.
After reinserting the code above, the Taxonomy:All terms filters is not available anymore in the dropdown and I find the following errors in the logs:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN ('37','140','35')) ORDER BY node_counter_totalcount ASC, node_created_create' at line 1 query: SELECT node.nid, node_counter.totalcount AS node_counter_totalcount, node.created AS node_created_created, node_data_field_photo.field_photo_fid AS node_data_field_photo_field_photo_fid, node_data_field_photo.field_photo_title AS node_data_field_photo_field_photo_title, node_data_field_photo.field_photo_alt AS node_data_field_photo_field_photo_alt, node.title AS node_title, node.changed AS node_changed FROM drupalnode node LEFT JOIN drupalnode_counter node_counter ON node.nid = node_counter.nid LEFT JOIN drupalcontent_field_photo node_data_field_photo ON node.vid = node_data_field_photo.vid WHERE (node.status = '1') AND (node.type IN ('ctrescuepets')) AND (.tid IN ('37','140','35')) ORDER BY node_counter_totalcount ASC, node_created_created DESC LIMIT 0, 30 in /var/www/test.pets.be/includes/database.mysql.inc on line 172.
Note: the '37','140','35' are the translated term ids (eg Car, Auto, Voiture)
And
Invalid argument supplied for foreach() in /var/www/test.pets.be/includes/form.inc on line 948.
The impact of this issue is quite high on a multilingual site that uses views with nodes in different languages. These can only be build via Taxonomy:All Terms.
#9
Drat - time to punt.
#10
First, I guess we need to consolidate these issues (http://drupal.org/node/239621) so we can keep the dialog consistent. I've already linked to this one from that one. I'm going to mark this one "duplicate"; let's move the discussion over there.
#11
pawshaker reports that this occurs even with Taxonomy Image disabled. IMO, the focus on localization here is a rabbit chase. The problem is that "Taxonomy:All Terms" is unavailable for filtering. Moving back to Views.
#12
I'm seeing this same error, a missing table name in the
AND (.tid IN (<list>))clause, in many views with the 'Taxonomy: Terms for <custom type>' filter. I've opened a separate issue, http://drupal.org/node/246654, for the SQL error.#13
I would like to report that on my site, the issue is solved. It's unclear why the Taxonomy:Terms filter disappeared or why it came back. (note: In the past few days, I had other stuff disappearing on the site, especially php code to show blocks. It's probably not related at all.) If I ever discover why this happened, I will post it here. Thanks to those who provided help.
#14
@pawshaker - this is the kind of thing that is usually associated with caching.
#15
Thanks Nancy. I emptied the view cache after every change, but that did not solve the problem immediately. But emptying views cache is definitely one of the key learnings for me.
#16
Hm, i don't know if this is related but, all of a sudden, in my view when i go to filters I have a category term missing!
I have two terms for 'Column' vocabulary.
When I pick the filter
Taxonomy: Terms for Column I see: '-none selected-', and only one of the two terms (like the other one disappeared)
however, when I pick a more general filter
Taxonomy: Term then I see both of the terms.
Where in database can I see what the problem is?
This is SO weird :)
P.S. clear Views cache didn't help.
#17
@omnyx: I would suggest that you open this against Views. It may very well be related to the issue mentioned above.
#18
just did - here's the related issue http://drupal.org/node/252114
#19
This is happening to me too. For me it is always the first term that goes missing.
#20
Please join omnyx's issue on Views.
#21
Marking as duplicate of #272289: Views 1.7 pre-req #2: Write new vocabulary fetcher