adds en/ to path_redirect module paths
moonray - January 24, 2008 - 17:04
| Project: | Internationalization |
| Version: | 5.x-2.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
When enabling i18n, all paths in path_redirect module get the language code automatically prepended, the result being this:
From: en/taxonomy/term/10
To: en/http://www.somewhere.com/
Obviously that breaks things pretty badly.

#1
The issue seems to be in the
i18n_url_rewrite()function. It automatically prepends the language, no matter whether it is a full url (http://site.com/page.html) or a relative one (node/23).Original code (line: 708)
<?phpif ($type == 'alias' && !i18n_get_lang_prefix($path)){
?>
Fixed code (line: 708)
<?phpif ($type == 'alias' && !strpos($path, '://') && !i18n_get_lang_prefix($path)){
?>
#2
This problem also occurs on the "track" tab (statistics core module).
#3
I haven't run into this issue, possibly because I'm not using that path_redirect module.
Anyway, the patch looks good, committed. Thank you.
#4
Automatically closed -- issue fixed for two weeks with no activity.