Bug #95013
openTYPO3 9,10,11 Languages fallback doesn't seem to work properly
0%
Description
Hello, everyone. We are currently creating a TYPO3 10.4 website. The website only contains the basic sitepackage extension. The site itself should be available in several languages, which can also have sub-languages. All languages should have a fallback. As a small example. We have 2 languages + the default language (can also be seen in the configuration attached).
The language en-de should refer to english (master) as a fallback. In TYPO3 itself I created the sys_languages and also translated 1 page into all languages. I also created a test content item that was translated for english (master), but not for en-de. Strangely enough, instead of the english (master) translation, the content element of Default is displayed to me in the frontend. The page title, however, is from the en-de translation. Also applies to TYPO3 9, 10 and 11. Does anyone have a solution or is this a known bug?
languages: - title: Default enabled: true languageId: 0 base: / typo3Language: de locale: de_DE.UTF-8 iso-639-1: de navigationTitle: Default hreflang: de direction: ltr flag: multiple - title: english (master) enabled: true languageId: 1 base: /en typo3Language: eu locale: en.UTF-8 iso-639-1: en navigationTitle: english (master) hreflang: en direction: ltr flag: eu - title: en-DE enabled: true languageId: 15 base: /en-de typo3Language: de locale: en_DE.UTF-8 iso-639-1: en navigationTitle: en-DE hreflang: en-de direction: ltr flag: de fallbackType: fallback fallbacks: "1"
Files
Updated by Oliver Hader about 3 years ago
- Status changed from New to Needs Feedback
How are contents retrieved by "the basic sitepackage extension" (TypoScript, data processors, ...)? Can you please post corresponding snippets from your scenario? Thx!
Updated by Andreas Reichel about 3 years ago
I have stored the same basic sitepackage under all three TYPO3 versions (initially without any further adjustments on my part), which I was able to create here (https://www.sitepackagebuilder.com/, current version attached). In the backend, I then selected the default backend layout and integrated the standard TYPO3 header element in all languages except for en-de. During one installation, I tried to build it using Flux backend layouts and content elements. However, I also get the wrong fallback language there.
Updated by Andreas Reichel about 3 years ago
I think I found the issue. Here is my extension, in which I overwritten and supplemented parts of the PageRepository. My fix works for TYPO3 10 and 11. At 9 I haven't tested the whole thing yet. It would be great if you could check this and possibly transfer it to the TYPO3 Core or fix it yourself.
Updated by Andreas Reichel about 3 years ago
We have optimized the extension again. You can find it attached.
Updated by Andreas Reichel about 3 years ago
- File imi_ce_language_helper_10.4_202109091422.zip imi_ce_language_helper_10.4_202109091422.zip added
- Priority changed from Should have to Must have
- Target version set to next-patchlevel
We have optimized the extension again. It would be great if you can have a look over it. This works from TYPO3 9 - 11.
Updated by Jessica Jagodzinski over 2 years ago
I can confirm the bug for TYPO3 11.5.10. I've tested the code from https://forge.typo3.org/attachments/36338 and it works for me.
Updated by Ebin Mathew over 2 years ago
Jessica Jagodzinski wrote in #note-6:
I can confirm the bug for TYPO3 11.5.10. I've tested the code from https://forge.typo3.org/attachments/36338 and it works for me.
Hi Jessica,
When I added the extension in typo3_11.5.13 the mentioned error throws in the backend.
Declaration of IMI\ImiCeLanguageHelper\Domain\Repository\PageRepository::getRecordOverlay($table, $row, $sys_language_content, $OLmode = '') should be compatible with TYPO3\CMS\Core\Domain\Repository\PageRepository::getRecordOverlay($table, $row, $sys_language_content = NULL, $OLmode = '') in /var/www/html/KYBUN/typo3conf/ext/imi_ce_language_helper/Classes/Domain/Repository/PageRepository.php line 32
Updated by Gerrit Code Review 9 months ago
- Status changed from Needs Feedback to Under Review
Patch set 1 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/+/83168
Updated by Stephan Salzmann 9 months ago
I can confirm, that if you will get an language overlay for a record the language fallback chain is not taken into account. This is a problem if you have a site configuration mentioned above and no translation for this record in e.g. languageId 15 (see example in the issue description). Then you will get the record in the language with languageId 0 and not with languageId 1.
Updated by Gerrit Code Review 9 months ago
Patch set 1 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/+/83169
Updated by Gerrit Code Review about 1 month ago
Patch set 2 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/+/83168
Updated by Gerrit Code Review about 1 month ago
Patch set 2 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/+/83169