Got a Multilanguage Taxonomy. I'm using the following option:
"Localize terms. Terms are common for all languages but their name and description may be localized."
This is the error I get, when I go to the specified path:
warning: Invalid argument supplied for foreach() in /var/www/newsdrum.com/html/sites/all/modules/i18n/i18ntaxonomy/i18ntaxonomy.module on line 578.
Path I visit:
de/games/article
Here my view export:
$view = new view;
$view->name = 'games_by_type';
$view->description = 'This view is going to list the games article with an argument "Article Type"';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = '0';
$view->api_version = 2;
$view->disabled = FALSE; // Edit this to true to make a default view disabled initially
$view->display = array();
$display = new views_display;
$display->id = 'default';
$display->display_title = 'Defaults';
$display->display_plugin = 'default';
$display->position = '1';
$display->display_options = array (
'style_plugin' => 'default',
'style_options' =>
array (
),
'row_plugin' => 'node',
'row_options' =>
array (
'teaser' => 1,
'links' => 1,
),
'relationships' =>
array (
),
'fields' =>
array (
),
'sorts' =>
array (
'created' =>
array (
'id' => 'created',
'table' => 'node',
'field' => 'created',
'order' => 'DESC',
'granularity' => 'second',
'relationship' => 'none',
),
),
'arguments' =>
array (
'tid' =>
array (
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'default_action' => 'empty',
'style_plugin' => 'default_summary',
'style_options' =>
array (
'count' => true,
'override' => false,
'items_per_page' => 25,
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'break_phrase' => 0,
'add_table' => 0,
'relationship' => 'none',
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' =>
array (
'article_game' => 0,
'page' => 0,
'story' => 0,
),
'validate_argument_php' => '',
'require_value' => 0,
'reduce_duplicates' => 0,
),
),
'filters' =>
array (
'type' =>
array (
'id' => 'type',
'table' => 'node',
'field' => 'type',
'operator' => 'in',
'value' =>
array (
'article_game' => 'article_game',
),
'group' => 0,
'exposed' => false,
'expose' =>
array (
'operator' => false,
'label' => '',
),
'relationship' => 'none',
'expose_button' =>
array (
'button' => 'Expose',
),
),
'status' =>
array (
'id' => 'status',
'table' => 'node',
'field' => 'status',
'operator' => '=',
'value' => 1,
'group' => 0,
'exposed' => false,
'expose' =>
array (
'operator' => false,
'label' => '',
),
'relationship' => 'none',
'expose_button' =>
array (
'button' => 'Expose',
),
),
),
'items_per_page' => 10,
);
$view->display['default'] = $display;
$display = new views_display;
$display->id = 'page';
$display->display_title = 'Page';
$display->display_plugin = 'page';
$display->position = '2';
$display->display_options = array (
'defaults' =>
array (
'access' => true,
'title' => true,
'header' => true,
'header_format' => true,
'header_empty' => true,
'footer' => true,
'footer_format' => true,
'footer_empty' => true,
'empty' => true,
'empty_format' => true,
'use_ajax' => true,
'items_per_page' => true,
'offset' => true,
'use_pager' => true,
'pager_element' => true,
'use_more' => true,
'distinct' => true,
'link_display' => true,
'style_plugin' => true,
'style_options' => true,
'row_plugin' => true,
'row_options' => true,
'relationships' => true,
'fields' => true,
'sorts' => true,
'arguments' => true,
'filters' => true,
),
'relationships' =>
array (
),
'fields' =>
array (
),
'sorts' =>
array (
),
'arguments' =>
array (
),
'filters' =>
array (
),
'path' => 'games/%',
);
$view->display['page'] = $display;
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | i18ntaxonomy_1.patch | 1.54 KB | gorbeia |
| #2 | i18ntaxonomy.patch | 670 bytes | rapsli |
Comments
Comment #1
merlinofchaos commentedSince the error occurs in an i18n module, let's put the bug there first and see if it's really the view at fault.
Comment #2
rapsli commentedI guess you were right. I wrote a lil patch to fix this problem. Just added an if statement to check if it is an array or not
Comment #3
rickardl commentedI had same problem with Internationalization and Views modules, that error occured on every page visited where i had the block visible.
the patch got rid of that error, so thanks for it :)
Comment #4
AaronCollier commentedThis is a duplicate of #252123: Compatability with views.
You really should do searches before reporting bugs. But since the patch is here, we can keep this one. Works for me as well.
Comment #5
drewish commenteda) there's no indenting
b)
is_array($view-field)is clearly wrong... $view->field? and when would it not be an array?Comment #6
merlinofchaos commentedIt might not be an array at any time prior to $view->init_handlers() being called, tho I dunno that there's much (any?) external access to the view at that point.
Comment #7
gorbeia commenteda) uploaded a patch with indenting
b) it is not an array when it is null and it is null when the view has no fields
Comment #8
gorbeia commentedfixed in beta2
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.