#89768l10n_mode "exclude" does not work with inline type
Description
If I set l10n_mode to “exclude” for inline model, then this model won’t be retrieved via its upper model.
*Example:*
Parent model “Car” has multiple inline “Seat” models with following TCA:
Car:
[
'ctrl' => [
'title' => 'Car',
'label' => 'title',
'sortby' => 'sorting',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'delete' => 'deleted',
'versioningWS' => false,
'hideAtCopy' => true,
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'languageField' => 'sys_language_uid',
'translationSource' => 'l10n_source',
'enablecolumns' => [
'disabled' => 'hidden',
],
'searchFields' => 'title',
'iconfile' => 'EXT:example/Resources/Public/Icons/car.gif',
],
'interface' => [...],
'types' => [...],
'columns' => [
...
'seat' => [
'exclude' => false,
'l10n_mode' => 'exclude',
'label' => 'Seat',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_example_domain_model_seat',
'foreign_field' => 'car',
],
],
...
],
]
Seat:
'ctrl' => [
'title' => 'Seat',
'label' => 'title',
'sortby' => 'sorting',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'delete' => 'deleted',
'versioningWS' => false,
'hideAtCopy' => true,
'languageField' => 'sys_language_uid',
'enablecolumns' => [
'disabled' => 'hidden',
],
'searchFields' => 'title,',
'iconfile' => 'EXT:example/Resources/Public/Icons/seat.gif',
],
...
If I now create a car with several seats and translate it, then seats are not visible in the translated model (in TYPO3) as expected. If I then try to get it via repository in the frontend, then the translated car has no seats.
Reviews 2
Related issues 4
History 14
-
Benni Mack changed Related to #82657 <span data-processor="relativetime" data-value="2020-05-12T21:28:37+00:00" > 05/12/20, 21:28 </span>
-
Benni Mack commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2020-05-12T21:28:55+00:00" > 05/12/20, 21:28 </span> -
Jonas Eberle commented <span data-processor="relativetime" data-value="2020-07-19T18:43:32+00:00" > 07/19/20, 18:43 </span>
The problem might not be Extbase-related. I think Extbase does not have to retrieve the default language model.
According to https://docs.typo3.org/m/typo3/reference-tca/master/en-us/Columns/Index.html#l10n-mode ‘l10n_mode’: ‘exclude’ is supposed to keep translated values in sync through DataHandler.
This does not work for me with TCA type ‘inline’. When updating the default language, the translated records are NOT kept in sync.
Example for a 1:n relation (`main <— 1:n —> related`).
'columns' => [ ... 'related' => [ 'l10n_mode' => 'exclude', 'config' => [ 'type' => 'inline', 'foreign_table' => 'tx_xxx_domain_model_related', 'foreign_field' => 'main', ... -
Oliver Hader commented <span data-processor="relativetime" data-value="2021-05-05T13:43:31+00:00" > 05/05/21, 13:43 </span>
The language aspect seems to be missing for the child
Seattable – it lacks the possibility to reference to their corresponding parent language records – specifically at leastl10n_parentis missing.Thus, please try to either
a) remove
tx_example_domain_model_seatdefinition forlanguageFieldSeattable is “monoglot” then and should™ be working
b) add
tx_example_domain_model_seatdefinitiontransOrigPointerFieldSeatentities now know about their language ancestors- that also implies that synchronization on the parent level
Carworks for their children as well
I’m not completely sure whether something in the Extbase data-retrieval (ORM) layer is missing in addition.
-
Oliver Hader changed Tags
tca, l10n_mode exclude,inline typetca, l10n_mode exclude,inline type, pending-close <span data-processor="relativetime" data-value="2021-05-05T13:43:51+00:00" > 05/05/21, 13:43 </span> -
Oliver Hader commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2022-01-10T19:35:12+00:00" > 01/10/22, 19:35 </span>Closing this issue. Feel free to reopen in case the problem occurs again.
-
Anonymous commented <span data-processor="relativetime" data-value="2023-01-12T10:18:05+00:00" > 01/12/23, 10:18 </span>
Jonas Eberle wrote in #note-3:
> The problem might not be Extbase-related. I think Extbase does not have to retrieve the default language model.
>
> According to https://docs.typo3.org/m/typo3/reference-tca/master/en-us/Columns/Index.html#l10n-mode ‘l10n_mode’: ‘exclude’ is supposed to keep translated values in sync through DataHandler.
>
> This does not work for me with TCA type ‘inline’. When updating the default language, the translated records are NOT kept in sync.
>
>
> Example for a 1:n relation (`main <— 1:n —> related`).
>
> […]How to overcome this?
-
Jan Kornblum commented <span data-processor="relativetime" data-value="2025-01-06T16:56:50+00:00" > 01/06/25, 16:56 </span>
Still an issue… And in addition we should have the possibility to (absolutely) deny auto creation of children when parent gets localized. In my opinion
l10n_mode => excludeshould behave that way. Or else bringing the old optionlocalizeChildrenAtParentLocalizationback? -
Georg Ringer commented and changed status
ClosedAccepted <span data-processor="relativetime" data-value="2025-01-07T08:06:15+00:00" > 01/07/25, 08:06 </span>reopened as request from jan
-
Jan Kornblum changed Related to #94539 <span data-processor="relativetime" data-value="2025-01-07T11:12:44+00:00" > 01/07/25, 11:12 </span>
-
Jan Kornblum changed Related to #105843 <span data-processor="relativetime" data-value="2025-01-07T11:14:34+00:00" > 01/07/25, 11:14 </span>
-
Benni Mack changed Related to #108986 <span data-processor="relativetime" data-value="2026-02-15T17:19:42+00:00" > 02/15/26, 17:19 </span>
-
Alexander Schnitzler commented <span data-processor="relativetime" data-value="2026-10-17T19:14:54+00:00" > 10/17/26, 19:14 </span>
I could not reproduce this on main, nor on 13.4, 12.4, 11.5 or 10.4: in all of them DataHandler copies the children into the translation on localize, and Extbase reads the copies for the translated parent, with overlays off, mixed and on. Versions before 10.4 could not be tested anymore.
When a record whose inline field has
'l10n_mode' => 'exclude'is localized, DataHandler copies the child records into the translation: children of a language aware table are localized (withl18n_parent), children of a table without language field are copied (witht3_origuid). This is covered by core tests:- @IrreForeignField/Modify/ActionTest::localizePageWithLocalizationExclude@
- @IrreForeignField/Modify/ActionTest::localizeParentContentWithMonoglotHotelChildWithLocalizationExclude@
How Extbase handles fields with
l10n_mode excludecompared to core is covered by the test suite added in f8b8ae65b76 (96683, #111055). For reading, Extbase returns the copies of the translation, as core does when it resolves relations of a translated record:- @ExcludedFromTranslationReadTest::infoOfExcludedInlineRelationIsTheCopyOfTheTranslationWithOverlaysOnByExtbase@
- @ExcludedFromTranslationReadTest::commentsOfExcludedInlineRelationAreTheCopiesOfTheTranslationWithOverlaysOnByExtbase@
Where Extbase still differs from core when writing (e.g. keeping the copies in sync when the default record changes), the suite pins this as skipped tests.
This also holds for the setup from the report, a child table with a language field but without
transOrigPointerField: the translated Car returns its Seats. For child tables without a language field, c3642829a32 (88837, #90997, #88063) removed a “Localization failed” log entry; it is part of 14.3.0. Up to 13.4 that entry is still written, but the copies are created as well.The remaining request, to deny the automatic creation of children when the parent is localized or to bring back
localizeChildrenAtParentLocalization, is a DataHandler feature and would change what the core tests above define. Please open a separate feature request for it.Closing this one as not reproducible.
If you think this is a mistake, please provide a explanation on how to verify this on main or 14.3 please.
If you want the DataHandler to change, please open a new ticket in another category. -
Alexander Schnitzler changed status
AcceptedClosed <span data-processor="relativetime" data-value="2026-10-17T19:15:07+00:00" > 10/17/26, 19:15 </span>
Hi Michael,
can you share your Model and your code to persist?