Project

General

Profile

Actions

Bug #90233

open

fallbackType strict still falls back

Added by Anonymous almost 5 years ago. Updated over 3 years ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2020-01-28
Due date:
% Done:

0%

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

Description

TYPO3 9.5.13

Steps to reproduce:

Website with 3 languages:

- default (DE)
- english
- spanish

Configure language "spanish" and use the following particular settings:

    -   title: ES
...
        fallbackType: strict
        fallbacks: '1'
...

Expected behaviour: Pages without translation should lead to 404.

Actual behaviour: page with content from fallback-language is shown.


Files

Actions #1

Updated by Susanne Moog over 4 years ago

  • Status changed from New to Needs Feedback

What is the value of global setting [FE][hidePagesIfNotTranslatedByDefault] = false ?

Actions #2

Updated by Anonymous over 4 years ago

Susanne Moog wrote:

What is the value of global setting [FE][hidePagesIfNotTranslatedByDefault] = false ?

Yes, it has the default value

$GLOBALS['TYPO3_CONF_VARS']['FE']['hidePagesIfNotTranslatedByDefault'] = false;
Actions #3

Updated by Anonymous over 4 years ago

Let's calrify the steps to reproduce:

Website with 3 languages:

- deutsch (0)
- english (1)
- chinese (2)

Configure language "spanish" and use the following particular settings:

languages:
    -   title: Deutsch
        enabled: true
        base: /de/
        typo3Language: de
        locale: de_DE.utf-8
        iso-639-1: de
        navigationTitle: DE
        hreflang: de-AT
        direction: ''
        flag: at
        languageId: '0'
    -   title: English
        enabled: true
        base: /
        typo3Language: default
        locale: en_US.utf-8
        iso-639-1: en
        navigationTitle: EN
        hreflang: en-US
        direction: ''
        fallbackType: strict
        fallbacks: ''
        flag: en-us-gb
        languageId: '1'
    -   title: Chinese
        enabled: true
        base: /zh/
        typo3Language: zh
        locale: zh_CN.utf-8
        iso-639-1: zh
        navigationTitle: ZH
        hreflang: zh-CN
        direction: ''
        fallbackType: strict
        fallbacks: '1'
        flag: cn
        languageId: '2'

Expected behaviour for chinese website: pages without translation should lead to 404.

Actual behaviour: page with content from fallback-language (languageId => 1) is shown.

Actions #4

Updated by Anonymous over 4 years ago

Just the presence of the fallbacks key, makes TYPO3 perform a fallback. Although fallbackType is strict. It should not fallback anywhere. fallbackType => free has this glitch too as far as I remember. But stay with the reported use-case first - as that was proven to fail.

Actions #5

Updated by Riccardo De Contardi almost 4 years ago

  • Category set to Site Handling, Site Sets & Routing
Actions #6

Updated by Anonymous almost 4 years ago

Don't know if this helps, but from my tests the option "fallbackType" just addresses content behaviour. I don't know if this is by design or a bug.

Actions #7

Updated by Anonymous over 3 years ago

Tobias Gaertner wrote in #note-6:

Don't know if this helps, but from my tests the option "fallbackType" just addresses content behaviour. I don't know if this is by design or a bug.

It also affects how pages are fetched/overlayed.

Actions #8

Updated by Benni Mack over 3 years ago

Ingo Fabbri wrote in #note-7:

Tobias Gaertner wrote in #note-6:

Don't know if this helps, but from my tests the option "fallbackType" just addresses content behaviour. I don't know if this is by design or a bug.

It also affects how pages are fetched/overlayed.

OK. But it looks like the global setting (mentioned by Susi) still applies. If you change the pages.l10n_cfg field to not show the page if not translated, it would work?

Actions #9

Updated by Anonymous over 3 years ago

Benni Mack wrote in #note-8:

If you change the pages.l10n_cfg field to not show the page if not translated, it would work?

That works.

But I would not call it a solution.

Actions #10

Updated by Anonymous over 3 years ago

Despite being described here: https://docs.typo3.org/m/typo3/guide-frontendlocalization/master/en-us/LocalizationOverview/Index.html#hiding-pages-if-no-translation-exist

I would not expect it to behave this way, as the language-settings in the site-configuration imply other behaviour.

Actions #11

Updated by Anonymous over 3 years ago

For reference:

Actions #13

Updated by Benni Mack over 3 years ago

Ingo Fabbri wrote in #note-9:

Benni Mack wrote in #note-8:

If you change the pages.l10n_cfg field to not show the page if not translated, it would work?

That works.

But I would not call it a solution.

Me neither. But it points out the flaw: If you have a global configuration, the site-specific should override this setting. Currently the global configuration is still taken into account.

Thanks for testing!

Actions #14

Updated by Benni Mack over 3 years ago

  • Status changed from Needs Feedback to Accepted
Actions

Also available in: Atom PDF