Forums / Install & configuration / Multilangual URL Alias... always show primary language

Multilangual URL Alias... always show primary language

Author Message

Marco Zinn

Tuesday 16 November 2010 1:16:29 pm

Hi there,

I have a multi-language site. Now, i used the "URL-Alias" feature to set up additional "names" for some content nodes. I chose to use the "direct" type, not a 301 redirection.

That worked fine for the first language (german, in my case).

Now, set up an additional URL alias for another language (english) on the some content node. But ez always shows the german version of the content node. I expected, that it would "stay" on the current siteaccess and show the english version of the node OR even switch over to the english siteaccess and show the english version of the content object. But it does neither.

Even worst, it switches over to the german siteaccess (primary access) and shows the german version of the node.

How should i process to make sure, that my new "long english URL" will end up with the english content on the english siteaccess? I could use server Rewrite rules, but shouldn't ez at least manage to show the english content?

Any help very much appreciated.

That's ez 4.1.3, by the way

Marco
http://www.hyperroad-design.com

Roberto Antoniazzi

Thursday 18 November 2010 12:03:28 am

Hi,

the problem seems related to the fetch('content', 'node', ... where the parameter

content_language

is not working properly fetching content in non-default language node.

there is a relative issue:

http://issues.ez.no/IssueView.php?Id=17632

and Bertrand posted also a patch here:

https://github.com/ezsystems/ezpublish/commit/0c6c99af8efbe8fa3b6b8e89b4ecfc674d78ea96

modifying this row

$path = eZURLAliasML::fetchPathByActionList( "eznode", $pathArray, $this->CurrentLanguage );

(adding the parameter relative to the language) in the file

kernel/classes/ezcontentobjecttreenode.php

but in my installation (4.3.0) this did not solve the problem.

Any help is very appreciated

roberto

Marco Zinn

Friday 19 November 2010 10:07:08 am

Hello Roberto,

thank you for your reply. And thanks for the GitHub link ;) . I found no link from the issue to the github screen.

Unfortunatly, this did not solve my issue either completly.

But now, when i specify the (non-default) siteaccess name "eng" with the URL, it does show the node in english. So, i can use http://hostname/eng/longlongurl to show up the node in english.

From http://doc.ez.no/eZ-Publish/Technical-manual/4.4/Features/Multi-language-support-for-URL-aliases/Managing-URL-aliases i read, this this is the intended behaviour. ("Note that multilingual aliases do not control which language the requested page will be displayed in (this depends on the language configuration of the current siteaccess).")

Edit: Just for documentation, if anybody else runs into this:

As the feature in ez is not (yet?) intended to work like this, i did a Tweak using an apache Redirect (in addition to specifying the URL Alias on the node).

RedirectMatch permanent ^/(very_long_url_for_englisch_version_of_node_for_search_engine)$ /eng/$1

This will tedirect any (unique) URL for a node to the (same) url alias in the english siteaccess. From there, ez kicks in and forwards or displays the node.

Marco
http://www.hyperroad-design.com

Sandra Parente

Monday 29 November 2010 3:56:05 am

I applied the Bertrand's patch to my multilingual site running with 4.4.0, but it still shows the main language. From error log: "No source name found, skipping message"

Any other solution?

Sandra Parente
www.netbliss.it