I got an error message for my multi language site.
- Notice: Undefined index: de in views_node_taxonomy_filter_handler_filter_tid->query() (Line 142 in /sites/all/modules/vntf/views_node_taxonomy_filter_handler_filter_tid.inc).
- Warning: Invalid argument supplied for foreach() in views_node_taxonomy_filter_handler_filter_tid->query() (Line 142 in /sites/all/modules/vntf/views_node_taxonomy_filter_handler_filter_tid.inc).
My $node language is german (de) but the $term_field (entity_reference) is saved as LANGUAGE_NONE (und).
I solved this problem by getting the field data through the field api function field_get_items().
Especially for your code:
$node_term_set = field_get_items('node', $node, $term_field);
So you can also waive your language inquery.
Comments
Comment #1
alicek commentedHello,
I am also getting this error.
I am not using multilingual.
And I got above error on every page.
I already try your code but problem was not solved.
Comment #2
alicek commentedHello,
I have solved this issue by changing Taxonomy Filter: Node Taxonomy Filter (for Vocabulary:Articles) in view.
So any one get such type of issue first check your all block views may be it will conflict other views or page.
Comment #3
jaydee1818 commentedI'm also getting this issue on my multilingual site:
Warning: Invalid argument supplied for foreach() in views_node_taxonomy_filter_handler_filter_tid->query() (line 142 of /sites/all/modules/vntf/views_node_taxonomy_filter_handler_filter_tid.inc).
Comment #4
oemb29 commentedAlso I'm getting this error:
Warning: Invalid argument supplied for foreach() in views_node_taxonomy_filter_handler_filter_tid->query() (line 138 /modules/contrib/vntf/views_node_taxonomy_filter_handler_filter_tid.inc).
Notice: Undefined variable: term_fields in views_node_taxonomy_filter_handler_filter_tid->query() (line 138 /modules/contrib/vntf/views_node_taxonomy_filter_handler_filter_tid.inc).
How to avoid this?
Comment #5
oemb29 commentedError line 138 is because I changed the vocabulary name and the Taxonomy Filter: Node Taxonomy Filter was missed
Comment #6
mandclu commentedThis patch should resolve the original issue here (handling untranslated fields in a site with translation) and a similar issue I ran into because the code wouldn't handle fields that allow more than one term to be specified.
Comment #7
mandclu commented