I will try to explain this request by an easy example.
---------------------
2 languages en, de
default en
2 pages mysite.com/de/strudel and mysite.com/en/apple
In d5+i18n if i go to mysite.com/strudel i will be redirected to mysite.com/de/strudel
In d6+i18n if i go to mysite.com/strudel i get access denied
---------------------
so the request would be to preserve this functionality from d5
note: more pages can have the same alias, so the decision which alias to use, should be made by the language weight value
(but i am not sure if other language should be stronger than the default language. i guess not, so this redirection is needed only if i get access denied)
critical priority: my visitors from outside links are getting to much access denied because of this missing redirection
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | i18nredirect.info.txt | 200 bytes | pasqualle |
| #4 | i18nredirect.module.txt | 1.32 KB | pasqualle |
Comments
Comment #1
pasqualleok, it is not access denied it is page not found, so
str_replace('acces denied', 'page not found', 'original request')Comment #2
drewish commentedi don't think this is the case... at least for built-in menu paths, like /admin going to /admin does the same thing as /en/admin.
Comment #3
pasqualleadmin is not an alias
my request is for aliases only..
i have an alias strudel (de) and the default language is english
in D6 if i go to page /strudel the page will not be displayed..
Comment #4
pasquallethis seems to work for me
Comment #5
pasquallesorry, this should be ASC
Comment #6
jose reyero commentedStrange behaviour. Maybe confirm that your path aliases have the right language and they don't have a language prefix (that was supported in drupal5, not in drupal6).
In Drupal 6, path aliases with a language only exist when visiting the site in that language, so mixed links (language prefix != path alias language) won't work.
Also check access for the paths without alias (node/x, node/y)
Comment #7
pasqualleI don't really understand what do you ask me to check.
The situation:
I had a site in D5 where:
1. default language is 'hu'
2. page node/48 language 'sk'
3. url alias "vcelarstvo" = node/48 language 'sk'
if i try mysite.com/vcelarstvo I can see that page (strange, but I don't need to tell the language)
In D6 this does not work.. so I need this module, because some sites linked my pages in the wrong way..
Comment #8
pkej commented#4 That one doesn't work for me on 6.6. I installed and enabled, but opera just shows an opera warning about redirection and a link to follow, except there is no link. At least without it I get a page not found error.
Comment #9
pasqualle@pkej: can you find the problem? I use it with D6.6 and it works nicely in Opera also..
can you tell
the alias
the default language
the language of the alias
the full url you tried
the language prefixes
?
Comment #10
pasqualle@Jose: is there a chance that this will be included in i18n or it would be better if I start a new project for this module?
Comment #11
pkej commentedI think it is my mistake in the configuration. I had changed to have Norwegian as the default language, but hadn't set en as language path for english content. It works great when that was fixed.
There is a lot of settings spread out between a lot of modules for configuring for multilanguage.
Comment #12
hass commentedDoes this interfere with global_redirect module?
Comment #13
pasqualle@hass: I don't know
Comment #14
.jon commentedI think the aliases should perhaps default to "all languages" instead of the relevant node language- at least when creating aliases together with translation.* The current way results in broken links, when creating nodes & translations in the normal way:
1) create node, set language, set path, save
2) create translation, set path, save
3) visit node (source language), click the link to translated content
4) page not found (because the created alias only exists in the translation's language, not in all or the source language)
temporary solution is to go to admin/build/path and setting the language to "all languages" for the alias.
* when one creates translation, it's usually in the not-default language of the site, and the alias target should be always reachable irrelevant of the visitors language setting or url.
Comment #15
pasqualle@.jon when you click the link to translated content, the language should be changed accordingly to the node language, so I don't know how you reached the fourth point. The translated node should be displayed in the translation's language. I am quite sure I can't reproduce your steps.. I guess there is something wrong with your link to the translated node. Are you using the build in link, or are you using a custom link?
note: When a node is not translated to given language then the language link should not be displayed.
I don't see any problem with that.
I had similar problem which results in "page not found" but it is a different issue: #311158: default node language
Comment #16
.jon commentedPasqualle,
time to report an user error, nothing really wrong here :)
The problem I described exists only with translated nodes that have been given an url alias with the path system, and language negotiation set to "path prefix only" (and no path prefix given in the alias). D6 automatically applies the translation's language as the alias's language, and when "Path prefix with language fallback" is not on it I had left this setting to path prefix at some point and neglected to check that earlier.
Comment #17
jose reyero commentedThanks .jon
Comment #18
pasqualle@Jose: as I understand .jon replied to his own issue described in #14, the original feature request is still unsolved. I will start a new project for this in the near future, please don't close the issue until then..
Comment #19
hass commented@Pasqualle: Why are you not integrating the functionality of #4 into globalredirect module if not already build-in... not sure, but I remember that there was some i18n additions in near past. No need for an extra module!
Comment #20
pasqualleI think the functionality of this module is questionable. This module is required only for users who used D5 with i18n and getting to much "page not found" errors due badly linked pages.. There should not be a redirect otherwise, so I think it should not be included in a general module like global redirect..
Comment #21
hass commentedSounds resonable... but globalredirect may already care about this in general. I'm not sure, but it may be only a very small addition and normally every good site should already have globalredirect installed...
Comment #22
jose reyero commented@Pasqualle,
I agree i18n for D5 had some inconsistencies with path aliases and language prefixes. For that version we just tried to make everything work somehow, in this case trying paths with and without language.
We are not preserving this loose behavior for D6. Now all these prefixes and alias are handled by Drupal core and handled right IMHO.
So if you have these inconsistent aliasing /links in your site and you want to keep them, please either put it in a new module, or maybe this may work as a feature request for globalredirect.
In any case I don't think this is a desirable feature for i18n as it allows fuzzy inconsistent aliasing and linking.
Comment #23
pasqualleproject node: http://drupal.org/project/i18nredirect