Project

General

Profile

Actions

Bug #93719

closed

Site config: language baseVariants still get removed when saving from GUI

Added by Benjamin Robinson about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2021-03-12
Due date:
% Done:

100%

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

Description

If a site contains language baseVariants they will be removed from the .yaml after saving the site config in the backend under certain conditions.

Steps to reproduce:

1. Create config.yaml

base: 'https://www.domain.de/'
baseVariants:
  -
    base: 'https://dev.domain.de/'
    condition: 'applicationContext == "Development"'
languages:
  -
    title: 'Deutsch'
    enabled: true
    base: /
    typo3Language: de
    locale: de_DE.utf8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ''
    flag: de
    languageId: 0
  -
    title: 'English'
    enabled: true
    base: 'https://www.en.domain.de/'
    baseVariants:
      -
        base: 'https://dev.en.domain.de/'
        condition: 'applicationContext == "Development"'
    typo3Language: default
    locale: en_GB.utf8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-DE
    direction: ''
    fallbackType: strict
    fallbacks: ''
    flag: gb
    languageId: 1
    websiteTitle: ''
rootPageId: 2
websiteTitle: ''

2. Clear all caches

3. Edit some setting of the language via Backend GUI, for example change the title 'English' -> 'British English', or the locale "en_GB.utf8" -> en_US.utf8.

The language's baseVariants will get removed.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #90159: Site config: language baseVariants get removed when saving from GUIClosed2020-01-20

Actions
Actions #1

Updated by Benjamin Robinson about 3 years ago

  • Related to Bug #90159: Site config: language baseVariants get removed when saving from GUI added
Actions #2

Updated by Benjamin Robinson about 3 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #3

Updated by Oliver Bartsch about 3 years ago

Hi,

I had a short look into this and can confirm that the base variants on a language level are removed when editing this language in the GUI.

This seems to be not related to the actual write process but caused by the SiteConfigurationController. Since #87831 it's possible to define baseVariants for languages. But because this is not reflected in the corresponding TCA [1], they are not included in $newSysSiteData - in case the language was adjusted - and therefore are being removed [2] before they are even passed to the write() method.

The reason why it won't be overwritten in case the corresponding language was not adjusted is that in such case, the array is just filled with the data from the current configuration [3]. If the site_language however exists in the passed form data - because it was changed, the values are overwritten [4]. And as mentioned, the baseVariants field does not exists in the TCA, so it won't be included in the passed form data and even if, can not be processed [5] as it would be of type inline.

[1] https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Configuration/SiteConfiguration/site_language.php
[2] https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php#L339
[3] https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php#L293
[4] https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php#L299
[5] https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php#L305

Actions #4

Updated by Georg Ringer over 2 years ago

  • Status changed from New to Accepted
Actions #5

Updated by Oliver Hader over 1 year ago

  • Sprint Focus set to On Location Sprint
Actions #6

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted 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/+/76460

Actions #7

Updated by Gerrit Code Review over 1 year ago

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

Actions #8

Updated by Gerrit Code Review over 1 year ago

Patch set 3 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/+/76460

Actions #9

Updated by Gerrit Code Review over 1 year ago

Patch set 4 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/+/76460

Actions #10

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 11.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/+/76496

Actions #11

Updated by Benni Mack over 1 year ago

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

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 11.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/+/76496

Actions #13

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch 11.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/+/76496

Actions #14

Updated by Benni Mack over 1 year ago

  • Status changed from Under Review to Resolved
Actions #15

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF