Bug #101801
open
TCA - columnsOverrides - type=file - allowed=... reserved strings are not resolved.
Added by Christian Hackl about 1 year ago.
Updated 4 months ago.
Category:
FormEngine aka TCEforms
Description
The reserved strings "common-image-types", "common-text-types", "common-media-types" aren't resolved (are not replaced by e.g. $GLOBALS['TYPO3_CONF_VARS']['GFX'][...]) at the "columnsOverrides" section, see Example:
$GLOBALS['TCA']['tt_content']['types']['your_custom_type'] = [
'showitem' => '
// ...
media,
// ...
',
'columnsOverrides' => [
'media' => [
'config' => [
'allowed' => 'common-media-types',
],
],
],
https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/File/Properties/Allowed.html
This does indeed not work, as the TcaPreparation is only applied to the initial TCA processing and not when columnsOverrides is applied in the FormEngine DataProvider.
Nikita Hovratov wrote in #note-1:
This does indeed not work, as the TcaPreparation is only applied to the initial TCA processing and not when columnsOverrides is applied in the FormEngine DataProvider.
so if i understand you correctly, this is how the behavior is supposed to be?
If that is so, it would be nice to add that in the doc at the possible places to put a hint^^ :)
I also do not know what the sentence / note in the yellow box means? Finally, "enableRichtext" also does more than just change the "view" / "display"... It's a bit confusing.
https://docs.typo3.org/m/typo3/reference-tca/main/en-us/Types/Properties/ColumnsOverrides.html
Ah. Nice drawback of that 'common-media-types' magic ...
this is handled in typo3/sysext/core/Classes/Preparations/TcaPreparation.php and simply not applied with columnsOverrides (which is a FormEngine thing). unsure if we should add it to columnsoverrides, probably not. For now, please fall back to the globals or a direct list, instead.
- Status changed from New to Accepted
- Category set to FormEngine aka TCEforms
Also available in: Atom
PDF