In my custom extensions’ TCA I am updating FAL reference fields to work with TYPO3 v12/v13. Previously I had defined a fieldname which was a camelCase version of the TCA/SQL fieldname (imgRel
for img_rel
: first argument of getFileFieldTCAConfig()
) This camelCase value is now stored under sys_file_reference.fieldname
– but TYPO3v12 searches for img_rel
and therefore does not show referenced files.
Question: How can I get this fieldname into the configuration for the TCA type file
?
Example of a configuration for TYPO3 < 12:
'img_rel' => [
'label' => 'Image',
'config' => TYPO3CMSCoreUtilityExtensionManagementUtility::getFileFieldTCAConfig(
'imgRel',
['maxitems' => 1],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
Same example as above for TYPO3 >= 12:
I cannot find a fieldname
property or anything similar in the documentation.
'img_rel' => [
'label' => 'Image',
'config' => [
'type' => 'file',
'maxitems' => 1,
'allowed' => 'common-image-types',
]
],