Review main Merged

89517[BUGFIX] Fix "stringlist" site set settings not persisting values

Garvin Hicking CR +2 V +2 Easy +21 −9 updated 05/27/25, 06:30

Commit message

Defining a settings.definitions.yaml file like this:

```
settings:
  foo.bar.baz:
    type: stringlist
    default: ['a', 'b']
    label: FooBar
```

shows a configuration value in the site settings editor with
a list of input fields (2 in this case with 'a' and 'b').

Changing this in the GUI did not persist the changes
properly, because validation expected a proper array
input, where a JSON input however is propagated.

This fix follows the recommendation in #106747 by
also performing the JSON decode in the `validate()`
method instead of just in the `transformValue()`
method. This is streamlined with its own
private method `decodeJsonAsFallback` to prevent
redundancy.

Can be reproduced by editing [1] and inserting:

```
  seo.sitemap.stringlist:
    type: stringlist
    default: ["foo", "bar"]
    label: StringList with default foo+bar
```

[1] EXT:seo/Configuration/Sets/Sitemap/settings.definitions.yaml

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Marvin Buchmann +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Marvin Buchmann +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 710

  1. Garvin Hicking uploaded patch set 1 05/23/25, 11:45

  2. core-ci voted on patch set 1 V -1 05/23/25, 11:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79421

  3. Garvin Hicking uploaded patch set 2 V -1 05/23/25, 12:03

  4. core-ci voted on patch set 2 V -1 05/23/25, 12:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79423

  5. Garvin Hicking uploaded patch set 3 V -1 05/23/25, 12:21

    Third times the charm
  6. core-ci voted on patch set 3 V +1 05/23/25, 12:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79425

  7. Benjamin Franzke commented on patch set 3 CR +1 V +1 05/27/25, 06:06

    StringListType.php:34

    I'm still not sure whether I'll change the backend part again, to not require this, but this fix is currently needed and helps a lot, thx!
  8. Marvin Buchmann voted on patch set 3 CR +1 V +1 05/27/25, 06:30

  9. Benjamin Franzke voted on patch set 3 CR +2 V +2 05/27/25, 06:30

  10. Benjamin Franzke merged patch set 4 05/27/25, 06:30