[BUGFIX] Reset MP parameter on shortcut to MountPoint 74/63174/2
authorBenni Mack <benni@typo3.org>
Tue, 4 Feb 2020 15:36:19 +0000 (16:36 +0100)
committerBenni Mack <benni@typo3.org>
Tue, 4 Feb 2020 15:41:17 +0000 (16:41 +0100)
If a page has a shortcut to a MountPoint page, the MP parameter
should not be doubled, when the mount_pid_ol flag was set.

Resolves: #90322
Releases: master, 9.5
Change-Id: I18a3109b353be2ea3367f6321b1fab1fa771fe7d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63174
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Daniel Sattler <sattler@b13.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Daniel Sattler <sattler@b13.de>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 26ebbda..e6794af 100644 (file)
@@ -1405,7 +1405,8 @@ class TypoScriptFrontendController implements LoggerAwareInterface
                     . 'mounts a page which is not accessible (ID ' . $this->originalMountPointPage['mount_pid'] . ').';
                 throw new PageNotFoundException($message, 1402043263);
             }
-            if ($this->MP === '') {
+            // If the current page is a shortcut, the MP parameter will be replaced
+            if ($this->MP === '' || !empty($this->originalShortcutPage)) {
                 $this->MP = $this->page['uid'] . '-' . $this->originalMountPointPage['uid'];
             } else {
                 $this->MP .= ',' . $this->page['uid'] . '-' . $this->originalMountPointPage['uid'];