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.

Comments

moonray’s picture

Status: Active » 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)

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

moonray’s picture

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

jose reyero’s picture

Status: 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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