Project

General

Profile

Actions

Bug #87781

closed

TCA type='none' throws InvalidFieldNameException when saving translated record

Added by Georg Tiefenbrunn over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2019-02-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Actions

Also available in: Atom PDF