[BUGFIX] Register FileBrowser for file_reference mode 35/58435/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 28 Sep 2018 11:42:35 +0000 (13:42 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Fri, 28 Sep 2018 14:19:15 +0000 (16:19 +0200)
Using the element browser for a type=group, internal_type=file_reference
TCA field leads to an exception due to a missing registration for
this mode. Register the file browser, similar to internal_type=file.

Resolves: #80541
Releases: master, 8.7
Change-Id: I54be7084f10d63ed262e903c296294589521f3df
Reviewed-on: https://review.typo3.org/58435
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
typo3/sysext/recordlist/ext_tables.php

index 204159a..9d64ef0 100644 (file)
@@ -17,7 +17,8 @@ if (TYPO3_MODE === 'BE') {
     );
 
     // register element browsers
-    $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;
+    $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']['file_reference'] = \TYPO3\CMS\Recordlist\Browser\FileBrowser::class;
+    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['folder'] = \TYPO3\CMS\Recordlist\Browser\FolderBrowser::class;
 }