#107925Different Translation Handling: DataHandler <==> Extbase
Description
Hello,
I have created a blog with 2 post entries (EXT:blog_example).
If I translate the blog via DataHandler in backend, all related posts will be translated, too. Perfect.
Here the CSV:
"uid","sorting","sys_language_uid","l10n_parent","l10n_source","t3_origuid","blog" "2","1","0","0","0","0","2" "3","2","0","0","0","0","2" "6","1","1","2","2","2","4" "7","2","1","3","3","3","4"
You see 2 postings in default language related to blog UID 2. After the translation you see two additional postings related to the translated blog with UID 4.
As the blog->posts relation is TCA type “inline” I think this is expected behavior. PS: For TCA type “select” all relations have to relate to the record in default language.
Here you see the TCA of the blog_example delivered by TYPO3 itself in functional tests:
And now the IMO wrong part. This is the CSV of the extbase fixture to test localization:
https://github.com/TYPO3/typo3/blob/13.4/typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/TranslationTestImport.csv#L7-L18
As you see, ALL relations (independent of the translation) back to blog table are UID 1! In Extbase you create a new query based on $blog->getUid() which results in 1 in your tests for blog in default language. To get all related posts you need the UID 1 also in translated post records.
But, if you store a record in DataHandler the related blog UID is different for translated records. So, after querying posts in extbase all posts without translation will not appear in frontend if “translation fallback” to default language is activated in site configuration.
Stefan
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[TASK] Different Translation Handling: DataHandler <==> Extbase Resolves: #107925 Releases: main
History 2
-
Benni Mack commented and changed removed the assignee <span data-processor="relativetime" data-value="2025-10-29T23:10:24+00:00" > 10/29/25, 23:10 </span>
-
Alexander Schnitzler commented and changed status
NewAccepted <span data-processor="relativetime" data-value="2026-10-17T13:51:53+00:00" > 10/17/26, 13:51 </span>The behaviour described here is now pinned on main by the Extbase conformance suite, a86aa2db89c (#110797). The suite only records what Extbase does today; it does not change any behaviour, so this issue is confirmed, not fixed.
The fixture @BehaviourConformanceTestImport.csv@ is built the way DataHandler stores the records: Blog A (uid 1) has a DA translation (uid 2), and the translated posts point to the translated blog.
@BehaviourConformanceTest::oneToManyChildrenAreLoadedByLocalizedParentUid@ loads Blog A and its posts. The expectations are in @childrenOfTranslatedParentDataProvider@:
- Default language: P1, P2, P4 (all languages), P5 and P8, plus P2 DE, which is listed twice (marked @todo).
- DA, overlays on: only P2 DA, P3 DA and P16 floating DA.
- DA, overlays mixed (language fallback): the same three DA posts. P1, P4 and P5, which have no DA translation, are not returned.
The 1:n children are selected by the translated parent uid (2), so with fallback the posts without a translation do not show up. That is the case reported here.
Dear Stefan,
unfortunately yes this is a known issue, these are two problems:
1. Extbase is not using DataHandler, I hope that we get to this point in v14 or v15.
2. MM relation handling is a big problem. Selects pointing to default language, but Inline does not (= should not) is also weird. There are several issues I can link to if you want.
To avoid future headaches of what is wrong or right in terms of relations, always refrain to the DataHandler CSV tests, they are by far better covered than Extbase Tests + Fixtures.
Benni.