Project

General

Profile

Actions

Bug #95013

open

TYPO3 9,10,11 Languages ​​fallback doesn't seem to work properly

Added by Andreas Reichel over 2 years ago. Updated 2 months ago.

Status:
Under Review
Priority:
Must have
Assignee:
-
Category:
Localization
Target version:
Start date:
2021-08-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

imi.zip (29.2 KB) imi.zip Andreas Reichel, 2021-08-30 11:20
imi_ce_language_helper.zip (6.21 KB) imi_ce_language_helper.zip Andreas Reichel, 2021-09-02 12:52
imi_ce_language_helper.zip (5.97 KB) imi_ce_language_helper.zip Andreas Reichel, 2021-09-09 07:54
imi_ce_language_helper_10.4_202109091422.zip (4.73 KB) imi_ce_language_helper_10.4_202109091422.zip Andreas Reichel, 2021-09-09 14:23
image.png (153 KB) image.png Ebin Mathew, 2022-08-12 05:14
Actions #1

Updated by Oliver Hader over 2 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!

Actions #2

Updated by Andreas Reichel over 2 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.

Actions #3

Updated by Andreas Reichel over 2 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.

Actions #4

Updated by Andreas Reichel over 2 years ago

We have optimized the extension again. You can find it attached.

Actions #5

Updated by Andreas Reichel over 2 years ago

We have optimized the extension again. It would be great if you can have a look over it. This works from TYPO3 9 - 11.

Actions #6

Updated by Jessica Jagodzinski almost 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.

Actions #7

Updated by Ebin Mathew over 1 year ago

Actions #8

Updated by Ebin Mathew over 1 year 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

Actions #9

Updated by Gerrit Code Review 2 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

Actions #10

Updated by Stephan Salzmann 2 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.

Actions #11

Updated by Gerrit Code Review 2 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

Actions

Also available in: Atom PDF