[BUGFIX] Register FileBrowser for file_reference mode 31/58431/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 28 Sep 2018 11:42:35 +0000 (13:42 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 28 Sep 2018 12:47:26 +0000 (14:47 +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/58431
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/recordlist/ext_localconf.php

index 0d5609b..0d77305 100644 (file)
@@ -2,9 +2,10 @@
 defined('TYPO3_MODE') or die();
 
 // 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;
 
 // Register default link handlers
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('