#87781TCA type='none' throws InvalidFieldNameException when saving translated record
Description
I’ve added a field help with TCA type='none' to display some custom help text in the Backend.
$GLOBALS['TCA']['tt_content']['columns']['help'] = [
'label' => 'Help',
'l10n_mode' => 'exclude',
'config' => [
'type' => 'none',
'renderType' => 'myCustomHelpRenderType',
],
];
Records in default language just work as expected.
Translated records can’t be saved:
> Doctrine\DBAL\Exception\InvalidFieldNameException: … Unknown column ‘help’ in ‘field list’
Current behavior: DataHandler tries to synch the type='none' field with TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor->synchronizeTranslationItem().
Expected behavior (see TCAReference https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/None.html):
- The DataHandler discards values send for type none and never persists or updates them in the database.
- Type none is the only type that does not necessarily need a database field.
Quick and dirty “fix”: Add the database field (tt_content.help).