Project

General

Profile

Actions

Bug #85695

closed

TCA columnsOverrides (tt_content:media) for types not properly respected on saving record in BE

Added by Martin Schulz over 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-07-31
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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'.

Actions #1

Updated by Jan Kornblum about 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']
                                    ]
                                ]
                            ]
                        ]
                    ]
                ]
            ]
        ],
    ]
); 
Actions #2

Updated by Susanne Moog about 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.

Actions

Also available in: Atom PDF