The search module doesn't work.

Not unique table/alias: 'n' query: SELECT DISTINCT i.sid, i.type FROM search_index i INNER JOIN node n ON n.nid = i.sid INNER JOIN node n USING (nid) INNER JOIN users u ON n.uid = u.uid WHERE n.status = 1 AND (n.language ='de' or n.language = '') AND (i.word = 'logo') in /var/www/goool/includes/database.mysql.inc on line 66.

What can I do?

Comments

killes@www.drop.org’s picture

Do you run the i18n module?

pumi77’s picture

yes.

pumi77’s picture

is there a problem with using i18n and the search.module?

pumi77’s picture

Project: Drupal core » Internationalization
Version: 4.6.1 » 4.6.x-1.x-dev
Component: search.module » Miscellaneous

The search module doesn't work anymore, since I installed the i18n module.

Not unique table/alias: 'n' query: SELECT DISTINCT i.sid, i.type FROM search_index i INNER JOIN node n ON n.nid = i.sid INNER JOIN node n USING (nid) INNER JOIN users u ON n.uid = u.uid WHERE n.status = 1 AND (n.language ='de' or n.language = '') AND (i.word = 'logo') in /var/www/goool/includes/database.mysql.inc on line 66.

What can I do?

megamuch’s picture

Is there (besides primal77) and me, anyone else with this problem.

I've been trying to see what goes wrong, but since I don't know what the correct query would be, it's kind of a shot in the dark.

Search and multilingualism (scrabble) are 2 cornerstones of my current website and without these two, I cannot go 'live'. Any help would be greatly appreciated!

megamuch’s picture

Title: Search Problem » Possible FIX!

Alrighty then.. I've seem to have a fix.

Running WAMP and drupal 4.6.1 with I18n.

Open up i18n.inc in your modules/i18n/ directory

Go to line 38

it says

    $result['join'] = 'INNER JOIN {node} n USING (nid)'; 

Change it to

    $result['join'] = '';

Upload the new file and voila.. Search works :) (at least for me...)

I'd advise you to keep a copy of the original code because I just tested this but I am unsure as to what the implications are. For now my search seems to work, but who knows what I've broken.

Hope this helps :)

jose reyero’s picture

Status: Active » Fixed

Sure you got rid of the error message. But also the node selection by language feature should have stop working :-)

I've just committed a fixed version of i18n.inc

jose reyero’s picture

Status: Fixed » Closed (fixed)