Project

General

Profile

Actions

Bug #91842

closed

Entries in sys_category_record_mm are created also for translated categories

Added by Michal Majernik over 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2020-07-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
sys_category, sys_category_record_mm, l10n_mode, exclude
Complexity:
Is Regression:
Sprint Focus:

Description

If I define a categorizable Field via Overrides with sys_language_uid 0 and -1 as follows:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
    'example',
    'tx_example_domain_model_item',
    'categories',
    [
        'label' => 'Categories',
        'exclude' => false,
        'fieldConfiguration' => [
            'foreign_table_where' => ' AND {#sys_category}.{#sys_language_uid} IN (-1, 0) ORDER BY sys_category.title ASC',
            'minitems' => 1,
            'maxitems' => 1,
        ],
        'l10n_mode' => 'exclude',
        'l10n_display' => 'hideDiff',
    ]
);
Then:
  1. I create a category without translations
  2. I create an Item and its translations with the selected category

=> a single sys_category_record_mm Relation is created

Then:
  1. I create a translation for the category

=> a second sys_category_record_mm Relation is created

Then:
  1. I save the Item

=> the second sys_category_record_mm Relation is removed

Expected behavior:
The second Relation should never be created as the categories field cannot be translated ('l10n_mode' => 'exclude')


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #89659: Translating a record creates superfluous wrong mm relationsClosed2019-11-13

Actions
Related to TYPO3 Core - Bug #89620: Creating MM relations in a group field with a translatable table causes translated records to show up twiceClosed2019-11-08

Actions
Related to TYPO3 Core - Bug #77902: Translating category causes creation of non-necessary relationsClosed2016-09-09

Actions
Actions

Also available in: Atom PDF