Bug #86595

No Language Fallback

Added by Kay Röseler 8 months ago. Updated 15 days ago.

Status:
Closed
Priority:
Must have
Category:
Localization
Target version:
-
Start date:
2018-10-08
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello core team,

for a configured page with 3 languages (default: German, 2nd English, 3rd Danish) and fallback for the two additional languages set to the other language plus the default language, no fallback will be performed if the data record is only in the standard language is available.

This is the site configuration for the 3 languages:

languages:
  -
    title: Deutsch
    enabled: true
    languageId: '0'
    base: /
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ltr
    flag: de
  -
    title: English
    enabled: true
    languageId: '1'
    base: /en/
    typo3Language: default
    locale: en_GB.UTF-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-GB
    direction: ltr
    fallbackType: fallback
    fallbacks: '2,0'
    flag: en-us-gb
  -
    title: Danish
    enabled: true
    languageId: '2'
    base: /da/
    typo3Language: default
    locale: da-DA
    iso-639-1: da
    navigationTitle: Danish
    hreflang: da-DA
    direction: ltr
    fallbackType: fallback
    fallbacks: '1,0'
    flag: dk

Related issues

Related to TYPO3 Core - Bug #86712: config.sys_language_overlay has no effect Closed 2018-10-22
Related to TYPO3 Core - Bug #86762: Site-Configuration defined language fallbacks not working Closed 2018-10-26
Duplicated by TYPO3 Core - Bug #87121: Content fallback does not work, when page translation does not exist yet Closed 2018-12-11

Associated revisions

Revision 8d61bef0 (diff)
Added by Andreas Fernandez 3 months ago

[BUGFIX] Fix fallback language handling

This commit solves some issues regarding language fallback handling:

- Resolve correct page for a localized variant respecting fallbacks
The Page Router now respects the configured language fallback chain
and tries to find a matching page candidate per language.

- Metadata of page (e.g. page title)
TSFE now respects the reconfigured language content id in case the
language fallback is active and resolves the correct data.

- Respect existing localizations in menu rendering
PageRepository, used by the menu, now respects the language fallback
chain and finds suitable localized pages.
However, this does not resolve all issues with shortcut pages.

Resolves: #81657
Resolves: #86595
Resolves: #19114
Releases: master, 9.5
Change-Id: Ic2b302989449ec14e7e6b5c54819870770655da9
Reviewed-on: https://review.typo3.org/c/59676
Tested-by: TYPO3com <>
Tested-by: Ralf Merz <>
Tested-by: Anja Leichsenring <>
Tested-by: Benni Mack <>
Reviewed-by: Ralf Merz <>
Reviewed-by: Anja Leichsenring <>
Reviewed-by: Benni Mack <>

Revision 1d19ad35 (diff)
Added by Andreas Fernandez 3 months ago

[BUGFIX] Fix fallback language handling

This commit solves some issues regarding language fallback handling:

- Resolve correct page for a localized variant respecting fallbacks
The Page Router now respects the configured language fallback chain
and tries to find a matching page candidate per language.

- Metadata of page (e.g. page title)
TSFE now respects the reconfigured language content id in case the
language fallback is active and resolves the correct data.

- Respect existing localizations in menu rendering
PageRepository, used by the menu, now respects the language fallback
chain and finds suitable localized pages.
However, this does not resolve all issues with shortcut pages.

Resolves: #81657
Resolves: #86595
Resolves: #19114
Releases: master, 9.5
Change-Id: Ic2b302989449ec14e7e6b5c54819870770655da9
Reviewed-on: https://review.typo3.org/c/59845
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Georg Ringer 7 months ago

  • Status changed from New to Needs Feedback

isn't that the same issue than #86597?

#2 Updated by Kay Röseler 7 months ago

Georg Ringer wrote:

isn't that the same issue than #86597?

Hello Georg, no it is not. In the course of this issue here, I noticed the other issue in troubleshooting. Even if the query is changed in the other issue, the overlay does not work.

In addition, the other issue only applies if only the default language is selected in the configuration. In the above configuration, the other issue does not occur.

#3 Updated by Alexander Grein 7 months ago

I can confirm this bug.

To reproduce:
- create a site configuration with e.g. english (0) and german (1) and configure 0 as fallback for language 1
- create a page in language 0 with some content in this default language but no translations
- open this page in frontend and switch to language 1 by adding the corresponding slug (e.g. /de/) to the url

Result:
(1/1) #1518472189 TYPO3\CMS\Core\Error\Http\PageNotFoundException
The requested page does not exist

#4 Updated by Philipp Seiler 7 months ago

  • Related to Bug #86712: config.sys_language_overlay has no effect added

#5 Updated by Carsten Hülsmann 7 months ago

Alexander Grein wrote:

I can confirm this bug.

To reproduce:
- create a site configuration with e.g. english (0) and german (1) and configure 0 as fallback for language 1
- create a page in language 0 with some content in this default language but no translations
- open this page in frontend and switch to language 1 by adding the corresponding slug (e.g. /de/) to the url

Result:
(1/1) #1518472189 TYPO3\CMS\Core\Error\Http\PageNotFoundException
The requested page does not exist

I can also confirm this. This is kind of a blocker for us at the moment.

#6 Updated by Stefan Neufeind 7 months ago

  • Related to Bug #86762: Site-Configuration defined language fallbacks not working added

#7 Updated by Wittkiel Gruppe 6 months ago

The status of this issue should be changed, i think here is already enough good feedback, if not please ask :-)

We also have this bug with current TYPO3 9.5.1:

- create a site-configuration with e.g. german (0) and english (1) and configure 0 as fallback for language 1
- create a page "test" in language 0 with some content in this default language but no translations for language 1
- language 0 http://example.com/test in frontend works
- language 1 http://example.com/en/test in frontend doesn't work, "RouteNotFoundException" is thrown in sysext/frontend/Classes/Middleware/PageResolver.php line 103


rootPageId: 1
base: 'http://example.com/'
languages:
  -
    title: Deutsch
    enabled: true
    languageId: '0'
    base: /
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ltr
    flag: de
  -
    title: English
    enabled: true
    languageId: '1'
    base: /en/
    typo3Language: default
    locale: en_GB.UTF-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-GB
    direction: ltr
    fallbackType: fallback
    fallbacks: '0'
    flag: gb
errorHandling: {  }
baseVariants: {  }
routes:
  -
    route: sitemap.xml
    type: uri
    source: 't3://page?uid=1&type=1533906435'

#8 Updated by Helmut Hummel 5 months ago

  • Duplicated by Bug #87121: Content fallback does not work, when page translation does not exist yet added

#9 Updated by Helmut Hummel 5 months ago

  • Status changed from Needs Feedback to Accepted

#10 Updated by Anja Leichsenring 4 months ago

  • Status changed from Accepted to In Progress
  • Assignee set to Anja Leichsenring

#11 Updated by Gerrit Code Review 4 months ago

  • Status changed from In Progress 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/59373

#12 Updated by Gerrit Code Review 4 months 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/59373

#13 Updated by Gerrit Code Review 4 months 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/59373

#14 Updated by Gerrit Code Review 4 months 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/59373

#15 Updated by Gerrit Code Review 4 months 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/59373

#16 Updated by Gerrit Code Review 4 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59373

#17 Updated by Gerrit Code Review 4 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59373

#18 Updated by Gerrit Code Review 3 months ago

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/59675

#19 Updated by Gerrit Code Review 3 months 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/59675

#20 Updated by Gerrit Code Review 3 months ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#21 Updated by Gerrit Code Review 3 months ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#22 Updated by Gerrit Code Review 3 months ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#23 Updated by Gerrit Code Review 3 months ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#24 Updated by Gerrit Code Review 3 months ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#25 Updated by Gerrit Code Review 3 months ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#26 Updated by Gerrit Code Review 3 months ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#27 Updated by Gerrit Code Review 3 months ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#28 Updated by Gerrit Code Review 3 months ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59676

#29 Updated by Gerrit Code Review 3 months ago

Patch set 22 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/+/59676

#30 Updated by Gerrit Code Review 3 months ago

Patch set 23 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/+/59676

#31 Updated by Gerrit Code Review 3 months ago

Patch set 24 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/+/59676

#32 Updated by Gerrit Code Review 3 months ago

Patch set 25 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/+/59676

#33 Updated by Gerrit Code Review 3 months ago

Patch set 26 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/+/59676

#34 Updated by Gerrit Code Review 3 months ago

Patch set 27 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/+/59676

#35 Updated by Gerrit Code Review 3 months ago

Patch set 28 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/+/59676

#36 Updated by Gerrit Code Review 3 months ago

Patch set 29 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/+/59676

#37 Updated by Gerrit Code Review 3 months ago

Patch set 30 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/+/59676

#38 Updated by Gerrit Code Review 3 months ago

Patch set 31 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/+/59676

#39 Updated by Gerrit Code Review 3 months ago

Patch set 32 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/+/59676

#40 Updated by Gerrit Code Review 3 months ago

Patch set 33 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/+/59676

#41 Updated by Gerrit Code Review 3 months ago

Patch set 34 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/+/59676

#42 Updated by Gerrit Code Review 3 months ago

Patch set 35 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/+/59676

#43 Updated by Gerrit Code Review 3 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59845

#44 Updated by Andreas Fernandez 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#45 Updated by Benni Mack 15 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF