due to the bug reported from module globalredirect, http://drupal.org/node/216271, i think we should removed the language prefix in $_REQUEST['q'] during languge init. in file language.inc,

change:

// Search prefix within enabled languages.
foreach ($languages as $language) {
if (!empty($language->prefix) && $language->prefix == $prefix) {
// Rebuild $GET['q'] with the language removed.
$_GET['q'] = implode('/', $args);
return $language;
}
}

to:

// Search prefix within enabled languages.
foreach ($languages as $language) {
if (!empty($language->prefix) && $language->prefix == $prefix) {
// Rebuild $GET['q'] with the language removed.
$_REQUEST['q'] = $_GET['q'] = implode('/', $args);
return $language;
}
}

because we don't need the language prefix after language_initialize(), it's set to global $language.

CommentFileSizeAuthor
redirect.patch625 byteswilson98

Comments

gábor hojtsy’s picture

Title: language prefix in $_REQUEST['q'] should be removed when bootstrap. » Remove language prefix from $_REQUEST['q'], just like $_GET['q']
Version: 6.3 » 8.x-dev

Interesting. Changing title to make it clear. Not really sure if this would be an API change or not.

jhedstrom’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

I think this has been taken care of somewhere along the way.