#101801TCA - columnsOverrides - type=file - allowed=... reserved strings are not resolved.
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',
],
],
],
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 2
History 9
-
Nikita Hovratov commented <span data-processor="relativetime" data-value="2023-09-08T07:29:05+00:00" > 09/08/23, 07:29 </span>
-
Christian Hackl commented <span data-processor="relativetime" data-value="2023-09-11T14:41:54+00:00" > 09/11/23, 14:41 </span>
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 -
Christian Kuhn commented <span data-processor="relativetime" data-value="2023-09-19T11:06:09+00:00" > 09/19/23, 11:06 </span>
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.
-
Christian Kuhn changed Related to #98479 <span data-processor="relativetime" data-value="2023-09-19T11:07:19+00:00" > 09/19/23, 11:07 </span>
-
Oliver Hader commented and changed status
NewAccepted <span data-processor="relativetime" data-value="2024-02-05T15:14:04+00:00" > 02/05/24, 15:14 </span>Confirmed in v12.4.10…
Besides that, when using an array for
allowed(like documented at https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/File/Properties/Allowed.html), the process fails with an exception:> (1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
> PHP Warning: Array to string conversion in typo3/sysext/backend/Classes/Form/FieldControl/ElementBrowser.php line 85(Exception above is reproduced in TYPO3 v13.0.0)
The bootstrap_package uses a similar configuration, see https://github.com/benjaminkott/bootstrap_package/blob/master/Configuration/TCA/Overrides/213_content_element_media.php#L70-L76
-
Garvin Hicking changed category <span data-processor="relativetime" data-value="2024-07-31T10:37:17+00:00" > 07/31/24, 10:37 </span>
-
Benni Mack changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2026-08-06T16:02:19+00:00" > 08/06/26, 16:02 </span>
-
Benni Mack changed Related to #103316 <span data-processor="relativetime" data-value="2026-11-13T13:20:40+00:00" > 11/13/26, 13:20 </span>
-
Benni Mack commented and changed status
AcceptedClosed <span data-processor="relativetime" data-value="2026-11-13T13:20:52+00:00" > 11/13/26, 13:20 </span>FYI: Fixed in v12+ with #103316
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.