md-systems / redirect

DEPRECATED: Redirect moved back to drupal.org, use the official repository.
https://www.drupal.org/project/redirect
21 stars 29 forks source link

Added patch from Agoradesign #87

Open kristofferwiklund opened 8 years ago

kristofferwiklund commented 8 years ago

Patch for #53

http://downloads.agoradesign.at/drupal/patches/redirect/fix_multilingual_redirects.patch

Berdir commented 8 years ago

Have a look at onKernelRequestCheckRedirect(), specifically this part:

    // Do the inbound processing so that for example language prefixes are
    // removed.
    $path = $this->pathProcessor->processInbound($request->getPathInfo(), $request);
    $path = ltrim($path, '/');

We should use the same. The fact that we have so many different functions is a left-over from merging global redirect in. I would prefer to merge all those functions somehow together or at least have a single method registered in the event subscriber that then calls the others. Then we can do this in a single place and don't have to duplicate code and waste time doing the same thing twice. Want to take that on?

agoradesign commented 8 years ago

Sorry to not have enough time to dig into and fully understand the different event handlers of Redirect, but at least here's a updated version of my patch, which works for current dev:

http://downloads.agoradesign.at/drupal/patches/redirect/fix_multilingual_redirects-v2.patch

charginghawk commented 8 years ago

FYI, as this repo is deprecated, this issue has been continued at: https://www.drupal.org/node/2704213