Review main Merged

78641[BUGFIX] Harmonize site configurations "flag" setting

Benni Mack CR +2 V +2 Easy +6 −0 updated 04/18/23, 20:39

Commit message

In the site configuration, the value is called "flag",
whereas in TypoScript or in the SiteLanguage object,
it is called "flagIdentifier" which is longer, but
technically more correct.

This change now also allows to use
page.10 = TEXT
page.10.data = siteLanguage:flag

instead of

page.10 = TEXT
page.10.data = siteLanguage:flagIdentifier

to avoid confusion for integrators.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Oli Bartsch +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Oli Bartsch +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 79

  1. Benni Mack uploaded patch set 1 04/14/23, 15:47

  2. core-ci voted on patch set 1 V +1 04/14/23, 15:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40632

  3. Benni Mack updated the commit message in patch set 2 V +1 04/18/23, 14:17

  4. core-ci voted on patch set 2 V +1 04/18/23, 14:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40880

  5. Oli Bartsch commented on patch set 2 04/18/23, 15:35

    Actually, both keys are already working. According to https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/SiteHandling/AddLanguages.html#confval-flag the flag has to be configured using the "flag" key and on instantiating the site language object, this value is assigned to the "$flagIdentifier" class property. By using the ->toArray() method below, both keys are already available in "$config" since the actual site configuration (YAML) is merged with the class properties.
  6. Oli Bartsch commented on patch set 2 V +1 CR +1 04/18/23, 16:46

    Reply

    Nevertheless, this as mentioned only works "by coincidence" as it's not documented and might be stop working as soon as `toArray()` changes. So I'm fine with this patch to ensure both keys always work.
  7. Stefan Bürk voted on patch set 2 V +1 CR +1 04/18/23, 18:39

  8. Georg Ringer voted on patch set 2 V +2 CR +2 04/18/23, 20:39

  9. Georg Ringer merged patch set 3 04/18/23, 20:39