Review 13.4 Merged

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

Benjamin Franzke CR +2 V +2 Easy +21 −9 updated 05/27/25, 06:31

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 45

  1. Benjamin Franzke commented on patch set 1 05/27/25, 06:06

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 05/27/25, 06:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79539

  3. Marvin Buchmann voted on patch set 1 CR +1 V +1 05/27/25, 06:22

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

  5. Benjamin Franzke merged patch set 2 05/27/25, 06:31