Bug #85695
closedTCA columnsOverrides (tt_content:media) for types not properly respected on saving record in BE
0%
Description
Overriding the allowed filetypes for tt_contents "media" field using columnsOverrides will properly render in backend on editing/creating the record but will not save the sys_file_reference.
$GLOBALS['TCA']['tt_content']['types']['my_type']['columnsOverrides']['media']['config']['filter'][0]['parameters']['allowedFileExtensions']='html';
$GLOBALS['TCA']['tt_content']['types']['my_type']['columnsOverrides']['media']['config']['overrideChildTca']['columns']['uid_local']['config']['appearance']['elementBrowserAllowed']='html';
So on editing the record it properly shows the overriden filtype in both the inline field and the element browser popup. On saving the record though the field is not properly saved (value "0") in db.
First examination shows that DataHandler::checkValue() seem to not properly respect columnsOverrides, so it check based on original allowedFileExtensions config which does not include 'html'.
Updated by Jan Kornblum over 4 years ago
In 9 LTS it seems to work. I do this in TCA/Overrides:
$GLOBALS['TCA']['tt_content']['types']['my_type'] = array_replace_recursive(
$GLOBALS['TCA']['tt_content']['types']['my_type'],
[
'columnsOverrides' => [
'assets' => [
'config' => [
'overrideChildTca' => [
'columns' => [
'uid_local' => [
'config' => [
'appearance' => [
'elementBrowserAllowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
]
]
]
]
]
]
]
],
]
);
Updated by Susanne Moog over 4 years ago
- Status changed from New to Closed
There have been some fixes in this area and according to the reporter it works in v9. As v8 is in priority / security bug fixing mode, I'm going to close the issue now.