Bug #90430
openLanguage handling of bidirectional mm selects is not consitent.
0%
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/
Updated by Oliver Hader about 5 years ago
- Status changed from New to Needs Feedback
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_mode
in TYPO3 v8 in the backend (DataHandler
et 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?
Updated by Eike Starkmann about 5 years ago
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 for
l10n_mode
in TYPO3 v8 in the backend (DataHandler
et 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.
Updated by Eike Starkmann almost 5 years ago
I think this might be related to #90925
I will test soon if this problem still exists in 9.5.16
Updated by S P over 4 years ago
- Priority changed from Should have to Must have
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.
Updated by S P over 4 years ago
If I remove l10n_mode => exclude
it 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.
Updated by Karsten Nowak (undkonsorten) over 4 years ago
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
Updated by Jan Kornblum over 4 years ago
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 extbase
Am i right?
Updated by Wolfgang Klinger over 4 years ago
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!
Updated by Gerrit Code Review about 4 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review about 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Jan Kornblum almost 4 years ago
- Related to Bug #84682: TYPO3 8 Relationship Localization Bug added
Updated by Michael Rainer almost 4 years ago
Is there any news?
The patch file is still under review, isn't it?
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Jan Kornblum over 3 years ago
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.
Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Jan Kornblum over 3 years ago
- Related to Bug #65859: Support l10n_mode in extbase added
Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review over 3 years ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Maik Kempe almost 3 years ago
- Related to Bug #92777: TCA 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 added
Updated by Gerrit Code Review almost 2 years ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review over 1 year ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review over 1 year ago
Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Jan Kornblum over 1 year ago
- Related to Bug #102336: Add support for localizing n:1 relations added
Updated by Gerrit Code Review about 1 year ago
Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review about 1 year ago
Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review about 1 year ago
Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review about 1 year ago
Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review about 1 year ago
Patch set 14 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review about 1 year ago
Patch set 15 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review about 1 year ago
Patch set 16 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 17 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 18 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 19 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 20 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 21 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 22 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 23 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 24 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Gerrit Code Review 12 months ago
Patch set 25 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Tymoteusz Motylewski 8 months ago
- Assignee deleted (
Tymoteusz Motylewski)
Updated by Gerrit Code Review 5 months ago
Patch set 26 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67172
Updated by Jan Kornblum 2 months ago
- Related to Feature #94539: Documentation on how to work with 1:n and n:1 relations and translations added
Updated by Jan Kornblum 2 months ago
- Related to Bug #105843: Language fallback broken for objectstorages added
Updated by cosmoblonde GmbH 13 days ago
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!
Updated by Garvin Hicking 13 days ago
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.