Download & Extend

Language switcher not grabbing URL Alias! Everything is ?q=node/XX

Project:Internationalization
Version:6.x-1.1
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)

Issue Summary

I have two languages setup, for example EN (English) and FR (French). The language switcher block is enabled with all languages and prefix only setting.

I create english frontpage content with URL alias path: content/welcome
The french content is set to Language = French and the URL alias path: content/bienvenue

I setup the translations for each node linking them together (ie. Translate tab for content/welcome and assign content/bienvenue node as it's translation and vice versa.)

The problem is now when viewing "content/welcome" node, the language switcher link for FR leads to path "node/98" instead of "fr/content/bienvenue" as it should? Anyone know what's wrong??

Thanks in advance!

Comments

#1

This bug seems to be related to this new feature:

New feature: allow to select existing node as translation, #295682

When choosing an existing node as the translation the language switcher does not retrieve the existing nodes URL alias but uses it's node path "node/XX" instead resulting in no language code preceding the url etc etc.

#2

My experience was similar - but I have a couple more details to add.

node/34 = english = about/what-is
node/35 = french = about/what-is

English is my default language. I create node/34 as language neutral and translatable. I then switch it to English and am now able to create the French node where I assign the same url alias. After I create the French node, it redirects me to node/35. Thinking that the alias didn't get saved, I edit the node - but the alias IS there.

I click around and realize:
mysite.com/about/what-is = node/34
mysite.com/fr/about/what-is = node/35

However, I cannot look at node/35 while in the English language (since it is a French node) and see it with its URL alias.

Unless node/35 is findable from a search (site or google) and displayed in the default language rather than its correct one, only content administrators should see this bug.

NOTE: I am using 6.x.-1.0.

#3

Priority:critical» normal

#4

Subscribing. I have the same problem. Is there a solution?

#5

Category:bug report» support request
Status:active» closed (works as designed)

These path alias are language dependendent, so check each alias has the right language assigned.

If using the same alias for two languages, like in #2, nope, you cannot look at the french node with the same alias while in English language.

So better think about how the system will tell which alias is which, check out your language settings (read carefully the language selection page) and don't try to mix duplicated aliases and languages because it will just not work.

And, in any case, this is Drupal core, not i18n module.