Project

General

Profile

Actions

Bug #92777

open

TCA l10n_mode exclude and MM relations

Added by Marc Hirdes over 3 years ago. Updated 4 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2020-11-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

in TYPO3 v10.4.9 when I use the following tx_csdummy_domain_model_product.php TCA

'items' => [
        'l10n_mode' => 'exclude',
        'config' => [
            'type' => 'select',
            'renderType' => 'selectMultipleSideBySide',
            'foreign_table' => 'tx_csdummy_domain_model_item',
            'foreign_table_where' => ' AND (tx_csdummy_domain_model_item.sys_language_uid IN (0,-1)) ORDER BY title ASC',
            'MM' => 'tx_csdummy_product_item_mm',
            ]
        ],

    ],

and in the tx_csdummy_domain_model_item.php TCA

'products' => [
        'l10n_mode' => 'exclude',
        'config' => [
            'type' => 'select',
            'renderType' => 'selectMultipleSideBySide',
            'foreign_table' => 'tx_csdummy_domain_model_product',
            'foreign_table_where' => ' AND (tx_csdummy_domain_model_product.sys_language_uid IN (0,-1)) ORDER BY title ASC',
            'MM' => 'tx_csdummy_product_item_mm',
            'MM_opposite_field' => 'items',
            ]
        ],  
    ],

it works in the default language as it should. But when I have both sites translated, something goes wrong.

For example I have porduct default (uid=1), product translated (uid=2), item default (uid=5) and item translated (uid=6).

A) If I save the product, then the uid of the translated product points to the default language uid of the item.

tx_csdummy_product_item_mm
uid_local  uid_foreign
1          5
2          5

B) If I save the item, then the uid of the translated item points to the default language uid of the product.

tx_csdummy_product_item_mm
uid_local  uid_foreign
1          5
1          6

With A I can't see the related product in the english version of the item in frontend. With B I can't see the related item in the english version of the product.

https://stackoverflow.com/questions/64678793/typo3-tca-l10n-mode-exclude-and-mm-relations


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #90430: Language handling of bidirectional mm selects is not consitent.Under Review2020-02-19

Actions
Actions

Also available in: Atom PDF