From 4b8d84afc51c33e6d33a236681d83a9c342e23aa Mon Sep 17 00:00:00 2001
From: Oliver Hader <oliver@typo3.org>
Date: Thu, 10 Feb 2022 17:31:03 +0100
Subject: [PATCH] [TASK] Avoid default type param in shortcut redirects

Avoid repeating the `type` query parameter when redirecting shortcuts
in the frontend rendering process - the page type is already part of
the `parameter` property handed over to `typolink`.

Resolves: #96820
Releases: main, 11.5
Change-Id: Ic5e718cefce2a34ad0b2f262e4ac44bbc71880f1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73389
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
---
 .../Classes/Controller/TypoScriptFrontendController.php         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
index 13a82655ae82..46819b88d6f6 100644
--- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
+++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
@@ -2118,7 +2118,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
         return GeneralUtility::makeInstance(ContentObjectRenderer::class, $this)->typoLink_URL([
             'parameter' => $parameter,
             'addQueryString' => true,
-            'addQueryString.' => ['exclude' => 'id'],
+            'addQueryString.' => ['exclude' => 'id,type'],
             'forceAbsoluteUrl' => true,
         ]);
     }
-- 
GitLab