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
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

moonray - January 24, 2008 - 18:35
Status:active» patch (code needs review)

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)

<?php
 
if ($type == 'alias' && !i18n_get_lang_prefix($path)){
?>

Fixed code (line: 708)

<?php
 
if ($type == 'alias' && !strpos($path, '://') && !i18n_get_lang_prefix($path)){
?>

#2

moonray - January 30, 2008 - 15:00

This problem also occurs on the "track" tab (statistics core module).

#3

Jose A Reyero - April 28, 2008 - 12:04
Status:patch (code needs review)» fixed

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

Anonymous (not verified) - May 12, 2008 - 12:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.