i18n and view >> SQL ERROR

zmove - March 29, 2007 - 08:49

Hi all,

I have a problem between i18n module and view module.

First I create my taxonomie in 2 language : French & English

= Articles
- actualité
- produits
- news
- products

I link "actualité with news" and "produits with producs" in translation tab.

-----

Then I created 2 story in actualité term and translated it, it's ok, with the translation block, I can switch language.

-----

Now I want to show the 2 first article in actualité in my homepage.

I create a view :

name : actualite
type : page
filter : publied = yes
Taxonomy: Terms for Articles = is one of / Actualité, news

Here I select the terms in both language, don't know if it's the right solution...

-----

Then I created a page and insert my view with insert view module [view:actualite]... it works for french language (the default one).

I create the translation of this page, with the same code in it : [view:actualite]

Result : The page works well in french, but If I click on the english flag on translation block, I have a big SQL error :

user warning: 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 ('1','3')) ) ORDER BY node_created_created DESC' at line 1 query: SELECT node.nid, node.created AS node_created_created, node.title AS node_title, node.changed AS node_changed, node.created AS node_created, node_data_field_image.field_image_fid AS node_data_field_image_field_image_fid, node_data_field_image.field_image_title AS node_data_field_image_field_image_title, node_data_field_image.field_image_alt AS node_data_field_image_field_image_alt, node.nid AS node_nid FROM dp_node node LEFT JOIN dp_content_type_article node_data_field_image ON node.vid = node_data_field_image.vid LEFT JOIN dp_i18n_node i18n ON node.nid = i18n.nid WHERE (i18n.language ='en' OR i18n.language ='' OR i18n.language IS NULL) AND ( (node.status = '1') AND (.tid IN ('1','3')) ) ORDER BY node_created_created DESC in D:\Taf\mySociety\www\includes\database.mysqli.inc on line 151.

I think there is one thing I didn't do well, because i18n module is compatible with view (I think), but in my logic, all is ok, so I don't know where can I make a mistake....

Need help ^^

thanks

zmove

 
 

Drupal is a registered trademark of Dries Buytaert.