Hello there,

I am using the i18n pluggin for my site.

When trying to add context to a panel I get the following error:

* user warning: Column 'nid' in where clause is ambiguous query: SELECT n.nid FROM node n LEFT JOIN i18n_node i18n ON n.nid = i18n.nid WHERE (i18n.language ='en') AND ( nid = 69) in /home/mysite/www/includes/database.mysql.inc on line 172.
* Invalid post selected

Any help would be greatly appreciated.

Comments

xfman’s picture

I found a similar bug at: http://drupal.org/node/184200

The fix at line 109:
$node = db_fetch_object(db_query(db_rewrite_sql("SELECT n.nid FROM {node} n WHERE nid = %d"), $nid));
change to:
$node = db_fetch_object(db_query(db_rewrite_sql("SELECT n.nid FROM {node} n WHERE n.nid = %d"), $nid));

Regards,
Vlassis

cpelham’s picture

In which file should we change line 109?

justheatingup’s picture

node.inc

cpelham’s picture

Ah...I thought so...only node.inc is an empty file in the latest Panels2 release so the code fix must now lie elsewhere unless you are referring to a different node.inc. I'll try searching for a similar line of code elsewhere in the Panels2 files. In the meantime can anyone else help point me in the right direction?

Panels2 rocks and I hate having to keep the Japanese language version of our site somewhat crippled.

merlinofchaos’s picture

I believe I have fixed all of these (it turned out there were several) in the -dev version, but I'm not 100% sure I checked it in yet.

Leeteq’s picture

Should this one be closed?

sdboyer’s picture

Status: Active » Fixed

Indeed it should. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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