Currently, redirect_get_current_redirect() is inconsistent with drupal_lookup_path():
- redirect_get_current_redirect() uses the language from $GLOBALS['language'].
- drupal_lookup_path() uses the language from $GLOBALS['language_url'].
This creates two problems:
- Redirects that were created for deleted aliases do not replicate the alias behavior 1:1.
- URLs that are redirected for anonymous users produce 404 for logged-in users, if their language is different.
I initially thought this to be a problem with url aliases, but I found that aliases actually work fine.
See #2907406: language-specific path aliases give 404 after login, if user language is different from default site language
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2908995-redirect-5.patch | 1.25 KB | pifagor |
Comments
Comment #2
donquixote commentedPatch would be something like this, in redirect_get_current_redirect().
Maybe this would need to be configurable to not break existing sites.
Comment #3
pifagorpatch
Comment #4
donquixote commented@pifagor Why is this patch named 'pathauto' instead of 'redirect'? :)
Comment #5
pifagorThanks, for the info. Fixed :)
Comment #6
neslee canil pinto#5 worked fine. Moving to RTBC
Comment #7
pifagorComment #9
pifagorComment #11
rohitbansal commentedglobal redirection is working for node/123 but not working for node/123/1