Bug #89130

Page Preview should respect language fallbacks

Added by Tobias Gaertner 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-09-10
Due date:
% Done:

100%

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

Description

OK, we have a quite complicated setup... but its working and its necessarry, because parts of the website have different default languages in BE.

Here is a snippet from the a language-configuration in a site:

...
languages:
  -
    title: Deutsch
    enabled: false
    languageId: '0'
    base: /
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ltr
    flag: de
  -
    title: '√úbersetzung Deutsch (nicht verwendet)'
    enabled: true
    languageId: '2'
    base: /
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ltr
    fallbackType: free
    fallbacks: '0'
    flag: de
...

So effectively in FE the languageUid 2 is used but falls back to 0 (which is used in the BE)
This works great, BUT previewing hidden pages is not possible, because the preview does not respect the fallback defined in the site language.

Associated revisions

Revision 86544089 (diff)
Added by Benni Mack about 2 months ago

[BUGFIX] Page preview respects language fallbacks

When a default language page is hidden, it should also be visible
when a translated page is rendered but not available.

The current "simple" check to only check for a specific language
to find out if a page is hidden, is wrong, as l18n_cfg could be built
in a way that a page translation (language>0) does not exist, but
the default record is actually available.

This change overcomes a long-standing issue that
translations of hidden pages can be previewed.

Resolves: #89130
Releases: master, 9.5
Change-Id: I8bc8f1e55a07b680c7b7b9591ec2936d50840548
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61841
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Tested-by: Daniel Goerz <>
Reviewed-by: Tobias Gaertner <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Daniel Goerz <>

Revision d92b5726 (diff)
Added by Benni Mack about 2 months ago

[BUGFIX] Page preview respects language fallbacks

When a default language page is hidden, it should also be visible
when a translated page is rendered but not available.

The current "simple" check to only check for a specific language
to find out if a page is hidden, is wrong, as l18n_cfg could be built
in a way that a page translation (language>0) does not exist, but
the default record is actually available.

This change overcomes a long-standing issue that
translations of hidden pages can be previewed.

Resolves: #89130
Releases: master, 9.5
Change-Id: I8bc8f1e55a07b680c7b7b9591ec2936d50840548
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61842
Tested-by: TYPO3com <>
Tested-by: Tobias Gaertner <>
Tested-by: Daniel Goerz <>
Reviewed-by: Tobias Gaertner <>
Reviewed-by: Daniel Goerz <>

History

#1 Updated by Gerrit Code Review about 2 months ago

  • Status changed from New 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/+/61841

#2 Updated by Gerrit Code Review about 2 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/+/61842

#3 Updated by Gerrit Code Review about 2 months ago

Patch set 2 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/+/61842

#4 Updated by Gerrit Code Review about 2 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/c/Packages/TYPO3.CMS/+/61841

#5 Updated by Benni Mack about 2 months ago

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

Also available in: Atom PDF