[BUGFIX] Fix negative pid when doing a positioned insert 00/50400/2
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:04:14 +0000 (12:04 +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/50400
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/backend/Classes/Controller/LinkBrowserController.php

index 8d89570..301d8c1 100644 (file)
@@ -159,6 +159,6 @@ class LinkBrowserController extends AbstractLinkBrowserController
                 }
             }
         }
-        return (int)$pageId;
+        return (int)BackendUtility::getTSCpidCached($browserParameters['table'], $browserParameters['uid'], $pageId)[0];
     }
 }