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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 01:56:16
Script start
Timing: Jan 18 2025 01:56:16
Module start 'layout'
Timing: Jan 18 2025 01:56:16
Module start 'content'
Timing: Jan 18 2025 01:56:17
Module end 'content'
Timing: Jan 18 2025 01:56:17
Script end

Main resources:

Total runtime0.7654 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.2813152.6563
Module start 'layout' 0.00660.0044 741.937539.5156
Module start 'content' 0.01110.7530 781.4531598.7500
Module end 'content' 0.76400.0013 1,380.203116.1094
Script end 0.7654  1,396.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.01201.5635160.0007
Check MTime0.00130.1758160.0001
Mysql Total
Database connection0.00160.205410.0016
Mysqli_queries0.673988.0370620.0109
Looping result0.00070.0876600.0000
Template Total0.705192.120.3525
Template load0.01061.390220.0053
Template processing0.694490.720320.3472
Template load and register function0.00010.013110.0001
states
state_id_array0.00520.674310.0052
state_identifier_array0.00140.178120.0007
Override
Cache load0.01041.3599480.0002
Sytem overhead
Fetch class attribute can translate value0.00070.094930.0002
Fetch class attribute name0.00100.134860.0002
XML
Image XML parsing0.00340.442330.0011
class_abstraction
Instantiating content class attribute0.00000.002170.0000
General
dbfile0.01582.0593220.0007
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs