Bug #82873
closedException with element browser on file_reference
0%
Description
TCA:
'file' => [ 'exclude' => 1, 'label' => 'LLL:EXT:filedownload/Resources/Private/Language/locallang_db.xlf:tx_filedownload_domain_model_file.file', 'config' => [ 'type' => 'group', 'internal_type' => 'file_reference', 'allowed' => '*', 'disallowed' => 'php', 'size' => 1, ], ],
when opening the element browser in the backend the result is an exception:
#1288965219: $className must be a non empty string.
Reason: there is no element browser defined for file_reference only for file.
But: there is no special file_reference browser needed, the normal file browser would do.
The fix is very simple:
/typo3_src/typo3/sysext/recordlist/ext_tables.php
add this line after line 22:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['file_reference'] = \TYPO3\CMS\Recordlist\Browser\FileBrowser::class;
then the normal file browser would be called which works as expected.
Updated by Frans Saris about 7 years ago
What are you trying to accomplish?
If you want to pick a file use the file picker option. If you want to create a sys_file_reference relation you will need a irre construction as the sys_file_reference is a relation table between your record and the sys_file record.
For an example see tt_content.media TCA for instance.
Updated by Frans Saris about 7 years ago
- Category set to File Abstraction Layer (FAL)
- Status changed from New to Needs Feedback
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Needs Feedback to Closed
No feedback since the last 90 days => closing this issue.
If you think that this is the wrong decision and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one. Thank you.