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

eZ debug

Timing: Jan 17 2025 23:46:28
Script start
Timing: Jan 17 2025 23:46:28
Module start 'content'
Timing: Jan 17 2025 23:46:29
Module end 'content'
Timing: Jan 17 2025 23:46:29
Script end

Main resources:

Total runtime0.7374 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 587.9609180.8125
Module start 'content' 0.00510.6226 768.7734601.9453
Module end 'content' 0.62780.1095 1,370.7188337.3750
Script end 0.7373  1,708.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5028210.0002
Check MTime0.00140.1932210.0001
Mysql Total
Database connection0.00060.087310.0006
Mysqli_queries0.666690.40181990.0033
Looping result0.00190.25711970.0000
Template Total0.712396.620.3561
Template load0.00230.306720.0011
Template processing0.710096.293320.3550
Template load and register function0.00010.014110.0001
states
state_id_array0.00110.144810.0011
state_identifier_array0.00120.167220.0006
Override
Cache load0.00190.2615480.0000
Sytem overhead
Fetch class attribute can translate value0.00130.180040.0003
Fetch class attribute name0.00190.257360.0003
XML
Image XML parsing0.00140.185440.0003
class_abstraction
Instantiating content class attribute0.00000.001870.0000
General
dbfile0.00230.3114330.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs