Bug #43504
closedFlexform internal_type=folder doesn't work and breaks Element Browser
0%
Description
My slideshow extension uses a flexform (for plugin configuration in the backend) with following snippet:
<folder> <TCEforms> <label>Folder with images to display</label> <config> <type>group</type> <internal_type>folder</internal_type> <maxitems>1</maxitems> <size>1</size> </config> </TCEforms> </folder>
This causes several problems, depending on the user's state or something like that.
Normally I see the following exception when opening the element browser:
#1: PHP Catchable Fatal Error: Argument 1 passed to TYPO3\CMS\Recordlist\Browser\ElementBrowser::TBE_expandSubFolders() must be an instance of TYPO3\CMS\Core\Resource\Folder, null given, called in /../typo3_src-6.0.0/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php on line 1252 and defined in /.../typo3_src-6.0.0/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php line 1427
My test user (no admin) also runs into this message but when I managed to open the element browser somewhere else in the backend and have expanded a folder, the element browser opens as expected.
Unfortunately, after clicking on the folder name, the element browser closes and nothing is selected (the expected value would have been the path to the folder).
After that, the syslog contains these error messages (ordered by descending timestamp):
Core: Error handler (BE): PHP Warning: basename() expects parameter 1 to be string, object given in /.../typo3_src-6.0.0/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php line 1673 Core: Error handler (BE): PHP Warning: rawurlencode() expects parameter 1 to be string, object given in /.../typo3_src-6.0.0/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php line 1666 Core: Error handler (BE): PHP Warning: strstr() expects parameter 1 to be string, object given in /.../typo3_src-6.0.0/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php line 1660 Core: Error handler (BE): PHP Warning: Missing argument 2 for TYPO3\CMS\Recordlist\Browser\ElementBrowser::folderList(), called in /.../typo3_src-6.0.0/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php on line 1430 and defined in /.../typo3_src-6.0.0/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php line 1653 Core: Error handler (BE): PHP Warning: rtrim() expects parameter 1 to be string, object given in /.../typo3_src-6.0.0/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php line 1867
If I change the "internal_type" to "file", everything works fine - but I'd like to select a folder.
I noticed this behavior after updating from version 4.7.7 to 6.0.0 in my production system.
In order to reproduce the error I set up a clean TYPO3 (blank package) and only installed my extension.
Files