TYPO3 9.5.2 Slug: Multilanguage: Page not found 404 exception, if no translation of page exists

前端 未结 3 361
我寻月下人不归
我寻月下人不归 2021-01-22 06:34

I have a website with two languages e.g de and en. De is my default language with no path prefix. En, the second language, has /en/ as prefix in the url. Now when I switch to th

3条回答
  •  迷失自我
    2021-01-22 07:23

    There is a open bug related to content fallback:

    https://forge.typo3.org/issues/86762

    Maybe try upgrade to 9.5.3 (Dont know if this is fixed there).

    As a workaround: Do you want to remove not translated pages in the english menu?

    Then you can set for all pages "Hide page if no translation for current language exists". This checkbox is available for every page under the tab "language".

    To do this for all your existing pages:

    UPDATE pages SET l18n_cfg = 2
    

    To automaticly set this flag for new created pages: Create a overrides pages.php in your extension.

    typo3conf/ext/[YOUR_EXTENSION]/Configuration/TCA/Overrides/pages.php
    

    And add the default value for l18n_cfg

    $GLOBALS['TCA']['pages']['columns']['l18n_cfg']['config']['default'] = 2;
    

提交回复
热议问题