Actions
Bug #101936
openDuplicate MM records after copy
Status:
Accepted
Priority:
Must have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2023-09-17
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
For TYPO3 11 (and 12) records with a bidirectional MM relations to themselves have duplicate MM records after copying them via DataHandler.
A prominent example would be EXT:news with its two columns related
and related_from
(stripped down to relevant parts):
EXT:news/Configuration/TCA/tx_news_domain_model_news.php:
'related' => [ 'config' => [ 'type' => 'group', 'allowed' => 'tx_news_domain_model_news', 'foreign_table' => 'tx_news_domain_model_news', 'MM_opposite_field' => 'related_from', 'MM' => 'tx_news_domain_model_news_related_mm', ], ], 'related_from' => [ 'config' => [ 'type' => 'group', 'foreign_table' => 'tx_news_domain_model_news', 'allowed' => 'tx_news_domain_model_news', 'MM' => 'tx_news_domain_model_news_related_mm', 'readOnly' => 1, ], ],Scenario:
- Install EXT:news
- Create a folder with 2 news records, one refering to the other (via
related
column) - Copy that folder
Original folder | Copied folder |
---|---|
Expected result: 2nd folder with 2 news records, one refering one time to the other
Actual result: 2nd folder with 2 news records one refering three times to the other
With TYPO3 10 this worked as expected. And since the TCA in news hadn't changed, I assume it's a TYPO3 core issue. Plus I can reproduce it with pages records as well.
Hint: when unsetting the TCA for the related_from
field, it's working flawlessly.
Files
Actions