Project

General

Profile

Actions

Bug #100002

open

Bidirectional "allowLanguageSynchronization" including "l10n_mode => exclude" not possible with a MM relation

Added by Denis Mir about 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2023-02-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Working on TYPO3 11LTS (latest patch release) we try to achieve a MM relation between two entities in our case "products" and "downloads" that can be edited from both sides (bidirectional) and have "allowLanguageSynchronization" including "l10n_mode => exclude" activated.

So the editor just sets the relation in the default language 0 with the following TCA setup:

        // Local side (tx_test_domain_model_product)
        'downloads' => [
            'exclude' => 1,
            'label' => 'Related downloads',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'foreign_table' => 'tx_test_domain_model_download',
                'foreign_table_where' => 'AND {#tx_test_domain_model_download}.{#pid} = ###PAGE_TSCONFIG_ID### AND tx_test_domain_model_download.sys_language_uid IN (-1,0)',
                'MM' => 'tx_test_domain_model_productsdownloads_mm',
                'behaviour' => [
                    'allowLanguageSynchronization' => true,
                ],
            ],
            'l10n_mode' => 'exclude',
            'l10n_display' => 'defaultAsReadonly',
        ],

        // Foreign side (tx_test_domain_model_download)
        'products' => [
            'exclude' => 1,
            'label' => 'Connected products',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'foreign_table' => 'tx_test_domain_model_product',
                'foreign_table_where' => 'AND {#tx_test_domain_model_product}.{#pid}=###PAGE_TSCONFIG_ID### AND tx_test_domain_model_product.sys_language_uid IN (-1,0)',
                'MM' => 'tx_test_domain_model_productsdownloads_mm',
                'MM_opposite_field' => 'downloads',
                'behaviour' => [
                    'allowLanguageSynchronization' => true,
                ],
            ],
            'l10n_mode' => 'exclude',
            'l10n_display' => 'defaultAsReadonly',
        ],

Depending on which side we are editing the relation in the backend the result is the following in the MM table. Screenshots show both cases.

1: local side editing

2: foreign side editing

So the language synchronisation does work for one side but not for both. Depending from which side we update (save) the entities in the backend we can switch the db state between the two states (screenshots) in the MM table.

Is this a bug or simply not supported? Since it is a common use case it should be supported. Especially with a lot of languages it makes sense to just edit these relations in the default language and have a language sync activated.


Files

vjFo1.png (28.2 KB) vjFo1.png Denis Mir, 2023-02-21 12:01
ahdDi.png (29.3 KB) ahdDi.png Denis Mir, 2023-02-21 12:01

No data to display

Actions

Also available in: Atom PDF