Hi,

I have a problem with path redirect module. I created 2 redirects :

language : en | from : guided-tour | to : guided-tour/welcome
language : de | from : guided-tour | to : guided-tour/willkommen

I think that I detect the problem in the function path_redirect_load_by_source, in the 2 first lines :
$where = $query ? "(source = '%s' OR source LIKE '%s')" : "source = '%s'";
$args = ($query ? array($source, $source . '?%%') : array($source)) + array($language);

$language will be never concatenate to $args because $args already contains the first cell. The second should be :
$args = ($query ? array($source, $source . '?%%') : array($source)) + array(2 => $language);
or
$args = ($query ? array($source, $source . '?%%') : array($source));
$args[] = $language;

CommentFileSizeAuthor
path_redirect.module.patch752 bytescharles.bourasseau

Comments

dave reid’s picture

Status: Active » Fixed

Ooh good find. Committed to CVS. Thanks!
http://drupal.org/cvs?commit=343150

charles.bourasseau’s picture

you're welcome

very nice module

Status: Fixed » Closed (fixed)

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

freakalis’s picture

I think this is a pretty critical fix. It has also been fixed for a long time. Maybe time for a new beta release?

TripleEmcoder’s picture

Indeed, releasing this would be very helpful.

jeff h’s picture

I can confirm this patch resolved the issue for me too.