Actions
Bug #91842
closedEntries in sys_category_record_mm are created also for translated categories
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:
- I create a category without translations
- I create an Item and its translations with the selected category
=> a single sys_category_record_mm Relation is created
Then:- I create a translation for the category
=> a second sys_category_record_mm Relation is created
Then:- 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')
Actions