[BUGFIX] Fix negative pid when doing a positioned insert 81/47381/4
authorMarco Huber <mail@marco-huber.de>
Thu, 24 Mar 2016 11:16:42 +0000 (12:16 +0100)
committerJan Helke <typo3@helke.de>
Thu, 27 Oct 2016 10:03:44 +0000 (12:03 +0200)
If you insert a content element (or a page) at a concrete position f.e.
after content element 15 the value in $row['pid'] is -15.
This pseudo pid has to be converted to the real pid to get the right
page TsConfig.

Resolves: #75254
Related: #72751
Releases: master, 7.6
Change-Id: Ia2c7a34bf6c825709ca51aa32b84a5fc660817c3
Reviewed-on: https://review.typo3.org/47381
Reviewed-by: Markus Gehrig <markus.gehrig96@gmail.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/backend/Classes/Controller/LinkBrowserController.php

index 1484712..c3efba3 100644 (file)
@@ -168,6 +168,6 @@ class LinkBrowserController extends AbstractLinkBrowserController
                 }
             }
         }
-        return (int)$pageId;
+        return (int)BackendUtility::getTSCpidCached($browserParameters['table'], $browserParameters['uid'], $pageId)[0];
     }
 }