I have this warning messaging when I search a term in attachments :

user warning: Unknown column 'n.language' in 'where clause' query: SELECT SUM(i.score * t.count) AS score FROM search_index i INNER JOIN search_total t ON i.word = t.word INNER JOIN files f ON f.fid = i.sid WHERE f.status = 1 AND (n.language ='en' OR n.language ='' OR n.language IS NULL) AND (i.word = 'lorem') AND i.type = 'file' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 ORDER BY score DESC LIMIT 0, 1 in /home/drupal/lampstack-1.1-2/apache2/htdocs/acquia-drupal3/modules/search/search.module on line 946.

The search correctly works but I have this warning. I have installed the i18n module and I have configured 2 two languages, some of my contents are translated.

Comments

cchamp’s picture

This warning message disapears when the i18n and locale modules are disabled.

rapsli’s picture

I confirm this bug. Any fixes? Probably there needs to be a join over the node table.

cchamp’s picture

I temporaly fixed the bug by adding these INNER JOIN commands to the SQL request :

'INNER JOIN {upload} u ON u.fid = f.fid INNER JOIN {node} n ON n.nid = u.nid '