[BUGFIX] Set anchor in all preview links of content elements
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Controller / EditDocumentController.php
index b6daa5e..0fef121 100644 (file)
@@ -866,6 +866,9 @@ class EditDocumentController extends AbstractModule
             $linkParameters = array_replace($linkParameters, $additionalGetParameters);
         }
 
+        // anchor with uid of content element]
+        $anchorSection = $table === 'tt_content' ? '#c' . $recordId : '';
+
         $this->popViewId = $previewPageId;
         $this->popViewId_addParams = GeneralUtility::implodeArrayForUrl('', $linkParameters, '', false, true);
 
@@ -877,7 +880,7 @@ class EditDocumentController extends AbstractModule
                 $this->popViewId,
                 '',
                 $previewPageRootline,
-                '',
+                $anchorSection,
                 $this->viewUrl,
                 $this->popViewId_addParams,
                 false
@@ -889,7 +892,7 @@ class EditDocumentController extends AbstractModule
                 $this->popViewId,
                 '',
                 $previewPageRootline,
-                '',
+                $anchorSection,
                 $this->viewUrl,
                 $this->popViewId_addParams
             )