I have a view that generates a page with a whole bunch of nodes (node name: 'review').
The website is multi language, using i18n module (Internationalization 6.x-1.0-beta1) and almost every node has a translation.
When you select a language, the view should only return nodes in that language, but instead it returns nodes in all languages.

I have selected the filter node: Language, but none of the settings works.

Here's an export of my view:

$view = new view;
$view->name = 'Reviews';
$view->description = 'List of reviews';
$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' => 'grid',
  'style_options' => 
  array (
    'columns' => '2',
    'alignment' => 'vertical',
  ),
  'row_plugin' => 'node',
  'row_options' => 
  array (
    'teaser' => 1,
    'links' => 1,
  ),
  'relationships' => 
  array (
  ),
  'fields' => 
  array (
  ),
  'sorts' => 
  array (
    'random' => 
    array (
      'id' => 'random',
      'table' => 'views',
      'field' => 'random',
      'order' => 'ASC',
      'relationship' => 'none',
    ),
  ),
  'arguments' => 
  array (
  ),
  'filters' => 
  array (
    'type' => 
    array (
      'id' => 'type',
      'table' => 'node',
      'field' => 'type',
      'operator' => 'in',
      'value' => 
      array (
        'review' => 'review',
      ),
      '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',
      ),
    ),
    'language' => 
    array (
      'id' => 'language',
      'table' => 'node',
      'field' => 'language',
      'operator' => 'in',
      'value' => 
      array (
      ),
      'group' => 0,
      'exposed' => false,
      'expose' => 
      array (
        'operator' => false,
        'label' => '',
      ),
      'relationship' => 'none',
      'expose_button' => 
      array (
        'button' => 'Expose',
      ),
    ),
  ),
  'items_per_page' => 1,
  'title' => 'Review',
  'offset' => 0,
  'use_more' => 1,
);
$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' => false,
    'offset' => false,
    'use_pager' => false,
    'pager_element' => false,
    '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' => 'reviews',
  'menu' => 
  array (
    'type' => 'none',
    'title' => 'Reviews',
    'weight' => '0',
  ),
  'tab_options' => 
  array (
    'type' => 'none',
    'title' => '',
    'weight' => '0',
  ),
  'items_per_page' => 50,
  'offset' => 0,
  'use_pager' => NULL,
  'pager_element' => NULL,
);
$view->display['page'] = $display;
  $display = new views_display;
  $display->id = 'block';
  $display->display_title = 'Block';
  $display->display_plugin = 'block';
  $display->position = '3';
  $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 (
  ),
);
$view->display['block'] = $display;

I hope someone can help me. Or is this a bug in the i18n module?

CommentFileSizeAuthor
#4 views.JPG58.47 KBsander_123

Comments

merlinofchaos’s picture

Status: Active » Fixed

I believe I have fixed this filter; it's hard for me to be sure as I do not have a good multi-language test install to try this on.

sander_123’s picture

Status: Fixed » Active

http://bert.4strokealphen.nl/reviews
^ that's my test site where it goes wrong..

Note also that the menu items are displayed twice on pages with these kind of views.

And then there's still the question: is this a Views or a I18n issue?

merlinofchaos’s picture

How did you change your view after the fixes? You need to edit the filter and make a proper selection, as the old one wasn't working right.

sander_123’s picture

StatusFileSize
new58.47 KB

i can still only select 'Yes' or 'No' in the View filter selection for Node: Language

attached image shows the views settings..

merlinofchaos’s picture

Status: Active » Fixed

Did you think that the fixed code would spontaneously appear in what you've already installed? Of *course* you have to update to the -dev version. Or you can wait for the next beta.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.