[BUGFIX] Keep MP parameters upon redirect of overlay 29/52829/10
authorElmar Hinz <t3elmar@gmail.com>
Wed, 17 May 2017 15:46:55 +0000 (17:46 +0200)
committerBenni Mack <benni@typo3.org>
Sun, 28 Oct 2018 16:31:53 +0000 (17:31 +0100)
When a mount point, that is overlayed, redirects to the overlaying page,
don't throw away existing mount point parameters. The other mount point
parameters may specify a mount point upwards in the root line.

Under normal circumstances the page should not be linked at all. However
a redirect is provided and as it is provided it should work as expected.

Releases: master
Resolves: #81251
Change-Id: I4cf830e5b24ebc9799e58f83d7787a726f92a3d4
Reviewed-on: https://review.typo3.org/52829
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 590d8f2..0e29f5d 100644 (file)
@@ -1610,7 +1610,11 @@ class TypoScriptFrontendController implements LoggerAwareInterface
                     . 'mounts a page which is not accessible (ID ' . $this->originalMountPointPage['mount_pid'] . ').';
                 throw new PageNotFoundException($message, 1402043263);
             }
-            $this->MP = $this->page['uid'] . '-' . $this->originalMountPointPage['uid'];
+            if ($this->MP === '') {
+                $this->MP = $this->page['uid'] . '-' . $this->originalMountPointPage['uid'];
+            } else {
+                $this->MP .= ',' . $this->page['uid'] . '-' . $this->originalMountPointPage['uid'];
+            }
             $this->id = $this->page['uid'];
         }
         // Gets the rootLine