Issue Bug Closed

#90997DataHandler tries to translate relations that are set as non-translatable

Jonas Eberle 04/10/20, 15:49 updated 04/21/26, 11:30

Description

Given a TCA like this

table1.php

return [
    'ctrl'      => [
        ...
        'languageField'            => 'sys_language_uid',
        'transOrigPointerField'    => 'l10n_parent',
        'transOrigDiffSourceField' => 'l10n_diffsource',
    ],
    ...
    'columns'   => [        
        'table2' => [
            'label'     => 'Label',
            'l10n_mode' => 'exclude',
            'config'    => [
                'type'          => 'inline',
                'foreign_table' => 'table2',
                'foreign_field' => 'title',
            ],
        ],
    ],
];

table2.php

<?php declare(strict_types=1);
return [
    'ctrl'      => [
        ...
        // no language_field
    ],
    ...
    'columns'   => [
        'title' => [ ... ]
    ]
];

I get : Localization failed; "languageField" and "transOrigPointerField" must be defined for the table table2 when I try to translate table1.

I would assume from https://docs.typo3.org/m/typo3/reference-tca/master/en-us/Ctrl/Index.html that such a configuration is possible. At least I cannot see that these fields are required.

Reviews 1