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

alicek’s picture

Hello,

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.

alicek’s picture

Hello,

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.

jaydee1818’s picture

I'm also getting this issue on my multilingual site:

Notice: Undefined index: en in views_node_taxonomy_filter_handler_filter_tid->query() (line 142 of /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 of /sites/all/modules/vntf/views_node_taxonomy_filter_handler_filter_tid.inc).

oemb29’s picture

Also 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?

oemb29’s picture

Error line 138 is because I changed the vocabulary name and the Taxonomy Filter: Node Taxonomy Filter was missed

mandclu’s picture

Issue summary: View changes
StatusFileSize
new0 bytes

This 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.

mandclu’s picture

Status: Active » Needs review