[BUGFIX] Show mount point pid in tooltip 72/58372/3
authorGuido Schmechel <guido.schmechel@brandung.de>
Fri, 21 Sep 2018 19:48:38 +0000 (21:48 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 25 Sep 2018 21:00:05 +0000 (23:00 +0200)
Use either field mount_pid or display a note

Releases: master
Resolves: #86349
Change-Id: Iaed4f7ab527f02644670d980dc6f6feaef010537
Reviewed-on: https://review.typo3.org/58372
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Alexander Grein <alexander.grein@gmail.com>
Tested-by: Alexander Grein <alexander.grein@gmail.com>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/frontend/Resources/Private/Language/locallang_tca.xlf

index 7d0dc43..9e8f29e 100644 (file)
@@ -68,6 +68,7 @@ class PageTreeRepository
         'perms_groupid',
         'perms_group',
         'perms_everybody',
+        'mount_pid'
     ];
 
     /**
index c923644..cdd8f51 100644 (file)
@@ -1525,15 +1525,19 @@ class BackendUtility
             }
             $parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['shortcut']['label']) . ' ' . $label;
         } elseif ($row['doktype'] == PageRepository::DOKTYPE_MOUNTPOINT) {
-            if ($perms_clause) {
-                $label = self::getRecordPath((int)$row['mount_pid'], $perms_clause, 20);
+            if ((int)$row['mount_pid'] > 0) {
+                if ($perms_clause) {
+                    $label = self::getRecordPath((int)$row['mount_pid'], $perms_clause, 20);
+                } else {
+                    $lRec = self::getRecordWSOL('pages', (int)$row['mount_pid'], 'title');
+                    $label = $lRec['title'] . ' (id=' . $row['mount_pid'] . ')';
+                }
+                $parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['mount_pid']['label']) . ' ' . $label;
+                if ($row['mount_pid_ol']) {
+                    $parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['mount_pid_ol']['label']);
+                }
             } else {
-                $lRec = self::getRecordWSOL('pages', (int)$row['mount_pid'], 'title');
-                $label = $lRec['title'] . ' (id=' . $row['mount_pid'] . ')';
-            }
-            $parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['mount_pid']['label']) . ' ' . $label;
-            if ($row['mount_pid_ol']) {
-                $parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['mount_pid_ol']['label']);
+                $parts[] = $lang->sl('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:no_mount_pid');
             }
         }
         if ($row['nav_hide']) {
index 4a8ce65..1735b59 100644 (file)
                        <trans-unit id="backend_layout.tabs.extended">
                                <source>Extended</source>
                        </trans-unit>
+                       <trans-unit id="no_mount_pid">
+                               <source>No Mount Point is set</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>