Skip to content
Snippets Groups Projects

Issue #2582295: Fix confirmation cancel links when installed in a subdirectory

Open Issue #2582295: Fix confirmation cancel links when installed in a subdirectory
4 unresolved threads
4 unresolved threads
Files
2
@@ -31,6 +31,10 @@ public static function buildCancelLink(ConfirmFormInterface $form, Request $requ
$options = UrlHelper::parse($query->get('destination'));
// @todo Revisit this in https://www.drupal.org/node/2418219.
try {
$base_path = $request->getBasePath();
if ($base_path && strpos($options['path'], $base_path) === 0) {
$options['path'] = substr($options['path'], mb_strlen($base_path));
}
$url = Url::fromUserInput('/' . ltrim($options['path'], '/'), $options);
}
catch (\InvalidArgumentException $e) {
Loading