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

Files 3

History 1020

  1. Vladimir Falcon commented <span data-processor="relativetime" data-value="2021-04-21T06:51:16+00:00" > 04/21/21, 06:51 </span>

    I am having exactly the same problem.

    TYPO3 V 9.5.26
    PHP 7.4

    Does anyone knows how to correct this problem?

  2. Sven Burkert commented and changed attached test.zip <span data-processor="relativetime" data-value="2025-12-05T11:21:40+00:00" > 12/05/25, 11:21 </span>

    Still a problem in TYPO3 v13.
    I’ve added a demo extension for reproducing the problem.
    Not only an error message is shown, but on every save of a record from default language from table1 a translation entry in table2 is created.

  3. André Buchmann commented and changed attached clipboard-202602251054-9pbku.png <span data-processor="relativetime" data-value="2026-02-25T09:58:43+00:00" > 02/25/26, 09:58 </span>

    _fyi_
    While working on the patch I encountered these errors in the backend:

    clipboard-202602251054-9pbku.png

    My conclusion is, that these buttons should be disabled by the integrator in the first place, as there is no possibility to translate a non-language-aware table record.
    So it’s not a bug, it’s a TCA misconfiguration in this special scenario.

  4. Maxime Lafontaine commented <span data-processor="relativetime" data-value="2026-02-26T01:45:02+00:00" > 02/26/26, 01:45 </span>

    André Buchmann wrote in #note-14:
    > _fyi_
    > While working on the patch I encountered these errors in the backend:
    >
    > !clipboard-202602251054-9pbku.png!
    >
    >
    > My conclusion is, that these buttons should be disabled by the integrator in the first place, as there is no possibility to translate a non-language-aware table record.
    > So it’s not a bug, it’s a TCA misconfiguration in this special scenario.

    The FormFramework (I thinks it’s that) should just never show them if there is no possibility of translating?

  5. Torben Hansen commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-04-11T11:40:07+00:00" > 04/11/26, 11:40 </span>

    Applied in changeset commit:c3642829a320c4b5e131b352fc5adefa67242cb6.