Forums / Extensions / eZ Find / Multi language site, urlalias are not those of the right language

Multi language site, urlalias are not those of the right language

Author Message

Jean-François Sénéchal

Friday 15 October 2010 7:58:51 am

Hi,
I updated my searchengie like this :

#frensh
php extension/ezfind/bin/php/updatesearchindexsolr.php -s marche-be --php-exec=/usr/bin/php --clean
#dutch
php extension/ezfind/bin/php/updatesearchindexsolr.php -s nl-marche-be --php-exec=/usr/bin/php

when I search something, research is done in the right language, but the node urlalias is the dutch and not the french !
what's wrong ?
Ez 4.2
Ezfind 2.0.0

L'informaticien est comme un petit canard:
il est calme en surface mais en dessous il brasse beaucoup d'eau pour
avancer ...!

Jean-François Sénéchal

Monday 18 October 2010 4:38:23 am

any idea ?

L'informaticien est comme un petit canard:
il est calme en surface mais en dessous il brasse beaucoup d'eau pour
avancer ...!

Nicolas Pastorino

Monday 18 October 2010 11:30:49 am

Hi,

Have you tried running the CLI script with you admin siteaccess' name as -s parameter ? Normally, one does not need to run this for every front siteaccess. Also, where are you having the URL issues from ? Back office or one of the frontend siteaccesses ?

Let us know,
Cheers,

--
Nicolas

Jean-François Sénéchal

Tuesday 19 October 2010 4:31:59 am

Hi

I have 3 sites access :

marche-be : default in french

nl-marche-be : dutch

admin-marche-be

I index my search engine with :

php extension/ezfind/bin/php/updatesearchindexsolr.php -s marche-be --php-exec=/usr/bin/php --clean

I can found a exemple :

french : http://www.marche.be/content/advancedsearch/?SearchText=conseil&x=0&y=0

dutch : http://nl.marche.be/content/advancedsearch/?SearchText=dienst&x=0&y=0

thanks

L'informaticien est comme un petit canard:
il est calme en surface mais en dessous il brasse beaucoup d'eau pour
avancer ...!

Jean-François Sénéchal

Tuesday 19 October 2010 8:48:00 am

No it works

I launch php extension/ezfind/bin/php/updatesearchindexsolr.php -s admin-marche-be --php-exec=/usr/bin/php --clean

I have replace in extension/ezfind/design/standard/templates/node/view/ezfind_line.tpl

<a href="{$node.global_url_alias}">{$node.name|wash}</a>

by

<a href="/{$node.url_alias}">{$node.name|wash}</a>

with "/" in the beginning (important)

L'informaticien est comme un petit canard:
il est calme en surface mais en dessous il brasse beaucoup d'eau pour
avancer ...!

Nicolas Pastorino

Wednesday 20 October 2010 12:50:26 am

Hi Jean-François,

Good to hear you sorted this out. You should slightly amend the template code as follows :

<a href={$node.url_alias|ezurl}>{$node.name|wash}</a>

which makes the code more portable, and much closer to eZ Publish standards.

Also please note that using .url_alias instead of .global_url_alias may be blocking in case you retrieve search results from other eZ Publish instances (3rd-party search with eZ Find). This is probably not the case for now, but should this happen in the future, come back to this thread and have another look at it.

Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye