Hello,
I'm using Pathauto 7.x-1.0-beta1 and I realized it doesn't work correctly on multi-language site. Here I describe the situation:
- My website has 2 languages: Indonesian and English. The default is English.
- I set highest priority of the language detection method to "Follow the user's language preference".
- Everything was okay because I set my account to English (under user account).
- But if the to set my account to Indonesian, then the Pathauto seemed not working.
- For example: the link should be "blog/welcome", but it becomes "node/11"
Comments
Comment #1
dave reidURL aliases are stored and will only work per language, so English URL aliases will not work when browsing your site in Spanish. This is nothing new to Pathauto and you would get the same behavior with just Drupal core.
See http://drupal.org/node/1126548
Comment #2
handokozhang commentedThanks for suggesting me the link.
I guess, I have followed that instruction on my test site but I found something strange that Pathauto didn't work as what it should be:
- I have enabled (with translantion) multi-language (English & Indonesian) on the content type "blog_post".
- I set Pathauto pattern "content/[node:title]" for default pattern (applies to all content types with blank patterns below).
- I set Pathauto pattern "blog/[node:title]" for all language neutral blog post paths
- I set Pathauto pattern "blog_en/[node:title]" for all English blog_post paths.
- I set Pathauto pattern "blog_id/[node:title]" for all Indonesian blog_post paths.
- If I add new language neutral blog_post, the Pathauto result is not correct ("content/mypost").
- If I add new English blog_post, the Pathauto result is correct ("blog_en/mypost").
- If I add new Indonesian blog_post, the Pathauto result is not correct ("node/35").
So, now what should do? Is it a bug in Pathauto or Drupal core? Or was there anything I did wrong? I also try to change the Multilingual support of the content type to "Enabled" (but without translation), the results are still not correct.
Please guide me what should I do next. Now, my website development is halted.
Comment #3
handokozhang commentedSomething new I want to add:
On the previous post (#2), I set my default language to English.
And if I set my default language to Indonesia ("Language Setting" on my account page):
- For new language neutral blog_post, the result is "content/mypost" (it should blog/mypost").
- For new English blog_post, the result is "node/34" (it should be "blog_en/mypost").
- For new Indonesia blog_post, the result is "blog_id/mypost" (correct).
The conclusions are:
- If I set my language to English, then all posts in English will have correct results of the path.
- If I change user language to Indonesia, all posts in English will be incorrect but all Indonesian posts will be correct.
- Language neutral posts always incorrect (it should be "blog/mypost" but "content/mypost").
Hope you can understand what I mean.
Comment #4
handokozhang commentedAny help for #2 & #3 ?
Comment #5
dave reidAgain, Pathauto does not do anything with how core loads those URL aliases depending on your current language.
If an existing content's alias is not updating, make sure you have an appropriate 'Update action' settings in your Pathauto settings and that the 'Automatic alias' checkbox is checked when you save the node.