[BUGFIX] Load PageTSconfig in localconf for LinkHandler 48/52648/3
authorBenni Mack <benni@typo3.org>
Fri, 28 Apr 2017 09:59:34 +0000 (11:59 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 11 May 2017 08:35:18 +0000 (10:35 +0200)
The pageTSconfig for LinkHandler is only loaded in ext_tables.php
which means it is only evaluated in the Frontend when a Backend User
is logged in.

However the functionality did work before, if a compiled pageTS was
available in the cache. This could have happened that the pageTS cache
was filled while a BE user was logged in, so it worked (but only in
random cases).

Resolves: #81057
Releases: master, 8.7, 7.6
Change-Id: Ib7cd62f82dff3a3b891dcb36e85c36b9a062142a
Reviewed-on: https://review.typo3.org/52648
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Marc Bastian Heinrichs <typo3@mbh-software.de>
Tested-by: Marc Bastian Heinrichs <typo3@mbh-software.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/recordlist/ext_localconf.php [new file with mode: 0644]
typo3/sysext/recordlist/ext_tables.php

diff --git a/typo3/sysext/recordlist/ext_localconf.php b/typo3/sysext/recordlist/ext_localconf.php
new file mode 100644 (file)
index 0000000..79dad5e
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+if (TYPO3_MODE === 'BE') {
+    // register default link handlers
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
+        TCEMAIN.linkHandler {
+            page {
+                handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\PageLinkHandler
+                label = LLL:EXT:lang/locallang_browse_links.xlf:page
+            }
+            file {
+                handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\FileLinkHandler
+                label = LLL:EXT:lang/locallang_browse_links.xlf:file
+                displayAfter = page
+                scanAfter = page
+            }
+            folder {
+                handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\FolderLinkHandler
+                label = LLL:EXT:lang/locallang_browse_links.xlf:folder
+                displayAfter = file
+                scanAfter = file
+            }
+            url {
+                handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\UrlLinkHandler
+                label = LLL:EXT:lang/locallang_browse_links.xlf:extUrl
+                displayAfter = folder
+                scanAfter = mail
+            }
+            mail {
+                handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\MailLinkHandler
+                label = LLL:EXT:lang/locallang_browse_links.xlf:email
+                displayAfter = url
+            }
+        }
+    ');
+}
\ No newline at end of file
index 817a6f0..a4d586a 100644 (file)
@@ -24,37 +24,4 @@ if (TYPO3_MODE === 'BE') {
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['db'] =  \TYPO3\CMS\Recordlist\Browser\DatabaseBrowser::class;
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['file'] =  \TYPO3\CMS\Recordlist\Browser\FileBrowser::class;
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['folder'] =  \TYPO3\CMS\Recordlist\Browser\FolderBrowser::class;
-
-    // register default link handlers
-    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
-               TCEMAIN.linkHandler {
-                       page {
-                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\PageLinkHandler
-                               label = LLL:EXT:lang/locallang_browse_links.xlf:page
-                       }
-                       file {
-                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\FileLinkHandler
-                               label = LLL:EXT:lang/locallang_browse_links.xlf:file
-                               displayAfter = page
-                               scanAfter = page
-                       }
-                       folder {
-                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\FolderLinkHandler
-                               label = LLL:EXT:lang/locallang_browse_links.xlf:folder
-                               displayAfter = file
-                               scanAfter = file
-                       }
-                       url {
-                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\UrlLinkHandler
-                               label = LLL:EXT:lang/locallang_browse_links.xlf:extUrl
-                               displayAfter = folder
-                               scanAfter = mail
-                       }
-                       mail {
-                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\MailLinkHandler
-                               label = LLL:EXT:lang/locallang_browse_links.xlf:email
-                               displayAfter = url
-                       }
-               }
-       ');
 }