Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all!
Since I'm using Internationalization module (D6, v1.5), I've noticed that during the redirection AFTER the login, the lang prefix is being added once again.
After poking around with the code, I've found the solution:
On line 77, add
global $language;
On line 83, add
// Check for path prefix and strip it out if its found.
$prefix = $language->language .'/';
$path = str_replace($prefix, '', drupal_urlencode($_REQUEST['q']));
Finally, on the following line, change the routine to this:
// using drupal_goto() with destination set causes a recursive redirect loop
header('Location: '. url('user/login', array('query' => 'destination='. $path, 'absolute' => TRUE)), TRUE, 302);
And the problem is solved. It always redirects me to the correct language and page.
I hope I've helped.
Many thanks for this wonderful module!
Comments
Comment #1
deekayen CreditAttribution: deekayen commentedComment #2
deekayen CreditAttribution: deekayen commented#339120: Redirect issues