#80944Inline records are duplicated upon saving the master record
Description
Context:
- Locations records (localized)
- Having Offices are inline relation, may be (externally) localized as well
TCA:
'offices' => [
'exclude' => 1,
'l10n_mode' => 'exclude',
'label' => 'Offices',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_myext_domain_model_office',
'foreign_field' => 'location',
'foreign_label' => 'name',
'foreign_sortby' => 'sorting',
'maxitems' => 20,
'appearance' => [
'collapseAll' => 1,
'expandSingle' => 1,
'newRecordLinkAddTitle' => 1,
'newRecordLinkTitle' => 'New Office',
],
],
],
Since commit e7217da45d1528101aaa2577940a489f45b3029e (#80141), following problem happens:
- I edit a Location having 2 offices, one of them being “disabled”/“hidden”
- Doing nothing else than showing the edit form, not expanding either the Offices records
- Saving
- Upon form reloading:
- Disabled Office is still there
- Visible Office has been duplicated 8 times
Sample extension and data has been shared with Olly for further investigation.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 5
- Feature #79658Introduce allowLanguageSynchronization
- Bug #80311IRRE shows default + translated records
- Bug #87640Keep language reference for associated l10n_mode=exclude children
- Bug #93572Inline Relational Records are multiplicated at multiple simultaneous translations
- Bug #80141Add allowLanguageSynchronization chain resolving
History 15
-
Xavier Perseguers changed due date start date Follows #80141 <span data-processor="relativetime" data-value="2017-04-21T15:37:57+00:00" > 04/21/17, 15:37 </span>
-
Oliver Hader changed category assigned to Oliver Hader PHP Version 7.0 Complexity medium <span data-processor="relativetime" data-value="2017-04-21T15:55:20+00:00" > 04/21/17, 15:55 </span>
-
Oliver Hader commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2017-04-23T21:14:16+00:00" > 04/23/17, 21:14 </span> -
Oliver Hader changed Complexity
mediumhard <span data-processor="relativetime" data-value="2017-04-23T21:14:27+00:00" > 04/23/17, 21:14 </span> -
Oliver Hader changed Related to #80311 <span data-processor="relativetime" data-value="2017-04-23T21:16:00+00:00" > 04/23/17, 21:16 </span>
-
Oliver Hader changed Related to #79658 <span data-processor="relativetime" data-value="2017-04-23T21:17:11+00:00" > 04/23/17, 21:17 </span>
-
Oliver Hader changed due date <span data-processor="relativetime" data-value="2017-04-23T21:19:45+00:00" > 04/23/17, 21:19 </span>
-
Lorenz Ulrich commented <span data-processor="relativetime" data-value="2018-12-13T21:31:19+00:00" > 12/13/18, 21:31 </span>
The link to documentation is broken, see here:
https://docs.typo3.org/typo3cms/extensions/core/latest/Changelog/8.6/Feature-79658-SynchronizedFieldValuesInLocalizedRecords.html -
Oliver Hader changed Related to #87640 <span data-processor="relativetime" data-value="2019-02-06T16:13:18+00:00" > 02/06/19, 16:13 </span>
-
Thomas Kühnel commented <span data-processor="relativetime" data-value="2019-03-22T11:01:54+00:00" > 03/22/19, 11:01 </span>
I’m able to reproduce this behavior if the parent field is ‘exclude’ => true and the editor has no access to this field. The child is configured this way:
child columns parentid config type=passthrough -
Susanne Moog changed status
Needs FeedbackNew <span data-processor="relativetime" data-value="2020-03-24T15:39:59+00:00" > 03/24/20, 15:39 </span> -
Oliver Hader changed removed the assignee <span data-processor="relativetime" data-value="2020-03-24T19:31:15+00:00" > 03/24/20, 19:31 </span>
-
Riccardo De Contardi changed Related to #93572 <span data-processor="relativetime" data-value="2024-06-07T20:42:11+00:00" > 06/07/24, 20:42 </span>
-
Benni Mack commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-01-17T18:41:23+00:00" > 01/17/26, 18:41 </span>Looking at the code we have solved this – I cannot reproduce this properly in v14, and we do have tests for this:
- localizePageWithLocalizationExclude
- localizePageTwiceWithLocalizationExclude
- localizePageAndAddHotelChildWithLocalizationExcludemaybe you have an extension at hand so I could reproduce this?
-
Riccardo De Contardi commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-04-29T08:00:11+00:00" > 04/29/26, 08:00 </span>I close this issue after long time without feedback (> 90 days);
if you think that this is the wrong decision or experience the issue again, please reopen it or open a new issue with a reference to this one.
Thank you.
The basic challenge with the extension I received can be expressed as a “It’s your turn” dilemma, when nested entities additionally point to each other with misleading semantic.
Written in an abstract way, we have the following TCA:
parent columns children l10n_mode=exclude config type=inline foreign_table=child foreign_field=parentid child columns parentid l10n_mode=exclude config type=select foreign_table=parentSince the following behavior has been integrated into TYPO3 8.6, l10n_mode “exclude” and “mergeIfNotBlank” are handled differently and the values of the ancestor language source (e.g. “default language”) are copied(!) to according translations. Find further details of that change here: https://docs.typo3.org/typo3cms/extensions/core/8-dev/Changelog/8.6/Feature-51291-SynchronizedFieldValuesInLocalizedRecords.html
Lets assume we have the following entities and record ids:
Now, let’s have a look on what happens, when the default language version of theparent:1– default languagechild:11– default languagechild:11.parentidis1child:12– default languagechild:12.parentidis1parent:2– translation ofparent:1parententity is modified:- all children of
- localized
- localized
- the field values of
- now both translated children point back to the
How to solve this:parent:1are copied/synchronized toparent:2by creating localizations if they don’t exist yetparent:11toparent:21parent:12toparent:22child.parentidof the default language are copied to the their dependent translation recordschild:11.parentIdis copied tochild:21.parentid, value is1child:12.parentIdis copied tochild:22.parentid, value is1parentrecord of the default language – that’s the mentioned misbehaviorl10n_mode=excludeandl10n_mode=mergeIfNotBlank(later will be migrated automatically toallowLanguageSynchronization=truel10n_mode=excludesettings from child references, used in back-selectors to ancestor bydisplayCond– these are thechild.parentidfields from the example abovechild columns parentid displayCond=FIELD:sys_language_uid:<=:0 config type=select foreign_table=parentThere was a similiar issue in powermail when upgrading to TYPO3 CMS 8, see the commit and initial pull-request for details:- https://github.com/einpraegsam/powermail/commit/01b2fd4884b1dd9cefd1b7ae1dc501d338b46dd5
- https://github.com/einpraegsam/powermail/pull/56
The only thing the Core could do here would be: