Review main Abandoned

93547[BUGFIX] Handle non-scalar site settings in detail view

Michael Blunck CR 0 V -1 Easy +12 −10 updated 04/13/26, 11:44

Commit message

The new site settings detail view in the backend crashes when
rendering settings of type 'stringlist'. This happens because
the Fluid template attempts to output the setting value directly,
which results in a "Cannot cast an array to string" exception
when an array is provided.

To resolve this, a new method `getRenderedValue()` is added to the
`EditableSetting` DTO. This method acts as a presenter by
normalizing various data types (arrays, scalars, Stringables) into
a string representation suitable for the UI.

While `getValueAsScalar()` was considered as a name,
`getRenderedValue()` was chosen instead to better reflect its
purpose for the presentation layer. It ensures that complex types
like arrays are flattened (e.g., via implode) before being
rendered, while maintaining the standard string representation for
scalars and objects implementing \Stringable.

The Fluid template is updated to use `{setting.renderedValue}` to
leverage this safe string conversion, preventing crashes and
ensuring consistent output.

Review

  • Code review CR 0
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 2

Review log 34

  1. Michael Blunck uploaded patch set 1 04/06/26, 15:46

  2. core-ci voted on patch set 1 V -1 04/06/26, 15:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99651

  3. Garvin Hicking commented on patch set 1 04/07/26, 08:59

    EditableSetting.php:44 Unresolved

    Thanks for trying this out. Two things: - You pushed a new patchset instead of pushing over the old one. I would recommend you abandon this one, use the original bugfix, check it out using the link you get when you press "d 3" on your keyboard, and then do a `git commit --amend` and push, then it will create a new patchset over the existing one - I made a boo here that the CI complains about - $value can never be an object. So you can drop that `|| $this-Value instanceof` portion Bonus thing 3: The indentatation in the fluid file has one space too many :)
  4. Garvin Hicking abandoned the change 04/13/26, 11:44