Open kristofferwiklund opened 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?
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
FYI, as this repo is deprecated, this issue has been continued at: https://www.drupal.org/node/2704213
Patch for #53
http://downloads.agoradesign.at/drupal/patches/redirect/fix_multilingual_redirects.patch