#90430Language handling of bidirectional mm selects is not consitent.
Description
I found a inconsistent behaviour in the new language handling of typo3 9.5. The situation is like this, I have a bidirectional mm relation with selects on both sides, which are excluded in non default languages. I adapted it to the blog example.
So lets say we have posts and tags which can be selected on both sides.
I reproduced this behaviour in blog_example:
https://github.com/undkonsorten/blog_example/commit/4bcdae43cf750c98f6f39fc4864430d202bf2891
Scenario:
I create a blog post (P) with uid 1
I create a tag (T) with uid 11
I create a translation P’ for P with uid 2
I create a translation T’ for T with uid 12
I open P (default language) and add T.
Database looks like this:
uid_local uid_foreign 1 11 2 11
P <=> T P' <=> T
I open T (default language) and save it.
Database looks like this:
uid_local uid_foreign 1 11 1 12
P <=> T P <=> T'
Save P’ or T’:
uid_local uid_foreign 1 11 1 12 2 12 2 11
P <=> T P <=> T' P' <=> T P' <=> T'
The problem is that when I save T the tag is no longer shown on that post in Frontend.
The modified extension can be found here:
https://github.com/undkonsorten/blog_example/
Reviews 5
- main 92859[WIP][BUGFIX] Make MM tables language-aware and workspace-aware
- 14.3 94947[TASK] Avoid frontend context leak in extbase controller tests
- main 94931[TASK] Avoid frontend context leak in extbase controller tests
- main 67172[BUGFIX] Change MM handling with l10n_mode exclude
- main 43147[BUGFIX] Save parents localized uid as child reference
Related issues 7
- Bug #65859Support l10n_mode in extbase
- Bug #84682TYPO3 8 Relationship Localization Bug
- Bug #92777TCA l10n_mode exclude (as well as allow language syncronisation bahviour) and bidirectional MM relations cause Extbase to use uidLocalized instead of UID from foreign side
- Feature #94539Documentation on how to work with 1:n and n:1 relations and translations
- Bug #102336Add support for localizing n:1 relations
- Bug #105843Language fallback broken for objectstorages
- Epic #108986Improve MM handling in TYPO3 Core related to language + workspace concepts
History 2053
Show 1428 earlier messages
-
Oliver Hader commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2020-03-09T14:40:05+00:00" > 03/09/20, 14:40 </span> -
Eike Starkmann commented <span data-processor="relativetime" data-value="2020-03-09T16:23:50+00:00" > 03/09/20, 16:23 </span>
Oliver Hader wrote:
> Thanks for your report, I’ve got a couple of questions – please see below
>
> Eike Starkmann wrote:
> > I found a inconsistent behaviour in the new language handling of typo3 9.5.
>
> Are you referring to changes forl10n_modein TYPO3 v8 in the backend (DataHandleret al) or the introduced site language handling in TYPO3 v9?
I’m refering the new language handling introduced in TYPO3 v9.
>
> > I open P (default language) and add T.
>
> How are entities/records modifies? Does that happen only in Extbase or can it be reproduced in the TYPO3 backend as well?
They are modified in backend. -
Eike Starkmann commented <span data-processor="relativetime" data-value="2020-04-29T11:03:46+00:00" > 04/29/20, 11:03 </span>
I think this might be related to #90925
I will test soon if this problem still exists in 9.5.16
-
S P commented and changed priority
Should haveMust have <span data-processor="relativetime" data-value="2020-06-26T13:01:05+00:00" > 06/26/20, 13:01 </span>I can confirm this (or some related) behaviour. I have this situation:
I have a tree. Each record has a renderType tree field where its parent is stored. The L=1 records store there the uid of the translated(!) parent. This is done by DataHandler itself (I import the records into the database by using DataHandler and also use the DataHandler to localize them).
The parent/tree field is
l10n_mode => exlcude!What happens then:
In Extbase and L=1 I say
$parent->getChildren()-> I get all localized children. Perfect.I then go into backend, and simply save one of the L=1 child records (no changes!). Backend shows everything fine, before and after. Seems perfect (but isn’t).
Then: I say in Extbase and L=1
$parent->getChildren()-> the just saved record is MISSING!What did change? The save in the backend changed the stored parent uid from the L=1 uid to the L=0 uid.
So, either DataHandler or Extbase have a bug here. Interesting to know would be why the Datahandler behaves differently when called from a click in BE or when called in a Command (import). Seems some l10n config is treated differently here.
-
S P commented <span data-processor="relativetime" data-value="2020-06-26T13:07:37+00:00" > 06/26/20, 13:07 </span>
If I remove
l10n_mode => excludeit works suddenly. The backend then does not change the refenrecned uid upon saving (it stays the one of the L=1 parent) and Extbase still displays it in the frontend. -
Karsten Nowak (undkonsorten) commented <span data-processor="relativetime" data-value="2020-09-01T14:55:45+00:00" > 09/01/20, 14:55 </span>
Problem still exists in 9.5.20.
Today I tried to remove the l10n_mode setting. If I limit the selectable data to the current sys_language_uid of the record and set every relation in the translated records too, then the output in frontend is really correctly. But, I don’t want editing every record twice if I add a new relation. Even more there are 3 or 4 relations to be add.
That can’t be the solution.
I expect the output should be work also with l10n_mode exclude. And it does, but only when I save the data on the local side. If I save from the foreign side, then it’s broken. Output in frontend is:
- On default language page: the translated data of the relation (e.g. the title in english not german)
- On translated page: no relations found.
I set up an ddev environment for local development for reproducing and analyzing the issue. There are a small extension with some simple models and relations between it. That makes it handy to understand the problem.
https://github.com/undkonsorten/dummymgmt-dev
Follow the Readme to setup the project. For questions I suggest slack. Write question to
karsten_uk@Here was the related Thread in Slack channel: https://typo3.slack.com/archives/C025BQLFA/p1598964529303700?thread_ts=1581514117.306000&cid=C025BQLFA
-
Jan Kornblum commented <span data-processor="relativetime" data-value="2020-09-01T16:53:47+00:00" > 09/01/20, 16:53 </span>
I had a similar issue with bidirectional relations (1:n <-> n:1). Tried to figure out what the currently expected behaviour is for handling relations in extbase as well as in backend. Finally, i’ve found…
https://review.typo3.org/c/Packages/TYPO3.CMS/+/43147/
“The backend expects the localized uid as parent id but extbase currently saves the original uid”For me it seems to:
- The backend still (10 LTS) expects the relation field to point to the translated record (because when pointing to the L=0 record, i’ve got inconsistences at least in backend IRRE view and localization wizard)
- l10n_mode=exclude for relation fields is currently not supported for backend
- l10n_mode=exclude for relation fields is currently not supported for extbaseAm i right?
-
Wolfgang Klinger commented <span data-processor="relativetime" data-value="2020-10-07T15:31:24+00:00" > 10/07/20, 15:31 </span>
ping ping still a major problem
I don’t feel able to solve this with this code base (DataHandler, Extbase), so no patch from me! -
Gerrit Code Review pushed patch set 1 for master to change 67172 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2020-12-17T09:22:59+00:00" > 12/17/20, 09:22 </span> -
Gerrit Code Review pushed patch set 2 for master to change 67172 <span data-processor="relativetime" data-value="2020-12-17T14:42:49+00:00" > 12/17/20, 14:42 </span>
-
Jan Kornblum changed Related to #84682 <span data-processor="relativetime" data-value="2021-06-10T11:31:15+00:00" > 06/10/21, 11:31 </span>
-
Michael Rainer commented <span data-processor="relativetime" data-value="2021-06-10T12:19:47+00:00" > 06/10/21, 12:19 </span>
Is there any news?
The patch file is still under review, isn’t it? -
Gerrit Code Review pushed patch set 3 for master to change 67172 <span data-processor="relativetime" data-value="2021-07-29T15:32:44+00:00" > 07/29/21, 15:32 </span>
-
Jan Kornblum commented <span data-processor="relativetime" data-value="2021-09-10T16:11:34+00:00" > 09/10/21, 16:11 </span>
This issue schould be extended to “language handling in relations is not constistent” in general. For example, (bidirektional) inline relations (1:n inline <-> n:1 select) should be evaluated, too. Lets have “seminar” and “event” (seminar.events = 1:n inline, event.seminar = n:1 select). I’ve spent the whole day trying to get any TCA configuration where both relations are set to “l10n_mode=exclude”, without success. I think the “relation + translation” handling should be checked completely, also in conjunction with extbase.
-
Gerrit Code Review pushed patch set 4 for master to change 67172 <span data-processor="relativetime" data-value="2021-09-14T18:45:46+00:00" > 09/14/21, 18:45 </span>
-
Jan Kornblum changed Related to #65859 <span data-processor="relativetime" data-value="2021-09-16T19:35:51+00:00" > 09/16/21, 19:35 </span>
-
Gerrit Code Review pushed patch set 5 for master to change 67172 <span data-processor="relativetime" data-value="2021-11-18T10:47:59+00:00" > 11/18/21, 10:47 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 67172 <span data-processor="relativetime" data-value="2021-11-29T14:07:01+00:00" > 11/29/21, 14:07 </span>
-
Maik Kempe changed Related to #92777 <span data-processor="relativetime" data-value="2022-05-18T19:49:53+00:00" > 05/18/22, 19:49 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 67172 <span data-processor="relativetime" data-value="2023-05-03T09:05:12+00:00" > 05/03/23, 09:05 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 67172 <span data-processor="relativetime" data-value="2023-07-06T11:50:51+00:00" > 07/06/23, 11:50 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 67172 <span data-processor="relativetime" data-value="2023-07-06T18:29:12+00:00" > 07/06/23, 18:29 </span>
-
Jan Kornblum changed Related to #102336 <span data-processor="relativetime" data-value="2023-11-07T10:10:18+00:00" > 11/07/23, 10:10 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-13T12:45:52+00:00" > 03/13/24, 12:45 </span>
-
Gerrit Code Review pushed patch set 11 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-13T21:56:11+00:00" > 03/13/24, 21:56 </span>
-
Gerrit Code Review pushed patch set 12 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-13T22:18:13+00:00" > 03/13/24, 22:18 </span>
-
Gerrit Code Review pushed patch set 13 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-13T22:31:47+00:00" > 03/13/24, 22:31 </span>
-
Gerrit Code Review pushed patch set 14 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-14T17:23:12+00:00" > 03/14/24, 17:23 </span>
-
Gerrit Code Review pushed patch set 15 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-14T18:15:20+00:00" > 03/14/24, 18:15 </span>
-
Gerrit Code Review pushed patch set 16 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-15T16:07:16+00:00" > 03/15/24, 16:07 </span>
-
Gerrit Code Review pushed patch set 17 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-16T16:59:54+00:00" > 03/16/24, 16:59 </span>
-
Gerrit Code Review pushed patch set 18 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-17T11:42:58+00:00" > 03/17/24, 11:42 </span>
-
Gerrit Code Review pushed patch set 19 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-17T12:02:56+00:00" > 03/17/24, 12:02 </span>
-
Gerrit Code Review pushed patch set 20 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-17T12:23:51+00:00" > 03/17/24, 12:23 </span>
-
Gerrit Code Review pushed patch set 21 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-17T12:24:35+00:00" > 03/17/24, 12:24 </span>
-
Gerrit Code Review pushed patch set 22 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-24T09:07:10+00:00" > 03/24/24, 09:07 </span>
-
Gerrit Code Review pushed patch set 23 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-24T13:42:34+00:00" > 03/24/24, 13:42 </span>
-
Gerrit Code Review pushed patch set 24 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-24T14:24:27+00:00" > 03/24/24, 14:24 </span>
-
Gerrit Code Review pushed patch set 25 for main to change 67172 <span data-processor="relativetime" data-value="2024-03-24T14:41:51+00:00" > 03/24/24, 14:41 </span>
-
Tymoteusz Motylewski changed removed the assignee <span data-processor="relativetime" data-value="2024-07-08T17:55:49+00:00" > 07/08/24, 17:55 </span>
-
Gerrit Code Review pushed patch set 26 for main to change 67172 <span data-processor="relativetime" data-value="2024-10-18T13:41:07+00:00" > 10/18/24, 13:41 </span>
-
Jan Kornblum changed Related to #94539 <span data-processor="relativetime" data-value="2025-01-07T18:37:22+00:00" > 01/07/25, 18:37 </span>
-
Jan Kornblum changed Related to #105843 <span data-processor="relativetime" data-value="2025-01-07T18:37:43+00:00" > 01/07/25, 18:37 </span>
-
cosmoblonde GmbH commented <span data-processor="relativetime" data-value="2025-03-03T11:40:50+00:00" > 03/03/25, 11:40 </span>
Hi,
what is the state of the issue?
The current patch cannot be applied to 12.4.27. Are there any news regarding this?Thank you!
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-03-03T11:48:18+00:00" > 03/03/25, 11:48 </span>
Most of the communication can be found in the associated patch and also https://forge.typo3.org/issues/92777#note-14 might lead to something, sadly I don’t have more insight to offer.
-
Benni Mack changed Related to #108986 <span data-processor="relativetime" data-value="2026-02-15T17:18:25+00:00" > 02/15/26, 17:18 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 92859 <span data-processor="relativetime" data-value="2026-02-16T17:23:18+00:00" > 02/16/26, 17:23 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 92859 <span data-processor="relativetime" data-value="2026-02-16T18:44:42+00:00" > 02/16/26, 18:44 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 92859 <span data-processor="relativetime" data-value="2026-02-16T19:02:55+00:00" > 02/16/26, 19:02 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 92859 <span data-processor="relativetime" data-value="2026-02-16T23:31:48+00:00" > 02/16/26, 23:31 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 92859 <span data-processor="relativetime" data-value="2026-02-18T11:07:13+00:00" > 02/18/26, 11:07 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 92859 <span data-processor="relativetime" data-value="2026-04-14T16:25:40+00:00" > 04/14/26, 16:25 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 94931 <span data-processor="relativetime" data-value="2026-07-24T15:19:55+00:00" > 07/24/26, 15:19 </span>
Thanks for your report, I’ve got a couple of questions – please see below
Eike Starkmann wrote:
> I found a inconsistent behaviour in the new language handling of typo3 9.5.
Are you referring to changes for
l10n_modein TYPO3 v8 in the backend (DataHandleret al) or the introduced site language handling in TYPO3 v9?> I open P (default language) and add T.
How are entities/records modifies? Does that happen only in Extbase or can it be reproduced in the TYPO3 backend as well?