I've got the i18n module activated, and Panels SQL doesn't play nice with it. After specifying a node id to add some node content as a pane, I'm getting the following SQL 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' OR i18n.language ='' OR i18n.language IS NULL) AND ( nid = 27) in /var/www/html/drupal-5.0/includes/database.mysql.inc on line 172.
    * Invalid node

The fix is line 147 of node.inc

    $node = db_fetch_object(db_query(db_rewrite_sql("SELECT n.nid FROM {node} n WHERE n.nid = %d"), $nid));

But I doubt I needed to tell you that :)

The same should probably be done for the title on line 150 too.

Comments

merlinofchaos’s picture

Status: Needs review » Fixed

Whoops, I missed fixing this a couple of revisions ago when I should have. Sorry about that. It's checked in now, though.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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