Issue Bug Closed

#109488Site Settings: Detail view crashes when rendering 'stringlist' types (Array to string conversion)

Michael Blunck 04/03/26, 21:19 updated 04/21/26, 11:30

Description

With the introduction of the new Site Settings Detail View in TYPO3 v14, a regression/oversight occurs when a setting is defined as a stringlist. The template attempts to render the value directly, but since stringlist values are stored as arrays, Fluid throws a TYPO3Fluid\Fluid\Core\Parser\Exception: “Cannot cast an array to string.”

Environment
  • TYPO3 Version: 14.x (Development/Current)
  • Component: cms-backend (Site Configuration / Settings Module)
Steps to Reproduce
  • Define a setting with type stringlist in your settings.definitions.yaml:
  email.templateRootPaths:
    default: ['']
    type: stringlist
    category: email
  • Navigate to the Sites > Setup > Gear Icon.
  • Add two or more templates to Email Template Root Paths
  • Open the “View Detail” for the site setup.
  • The page will trigger a critical error (Exception #1698750868).

*Affected Code*
File: EXT:backend/Resources/Private/Templates/SiteConfiguration/Detail.fluid.html
Line: 514

The current implementation lacks a check for the data type before outputting {setting.value}.

*Proposed Solution*
Since the Detail View is intended to show a summary of all active settings, it should handle different configuration types gracefully. Implementing an f:switch based on {setting.definition.type} is the cleanest way to ensure that arrays or booleans are rendered correctly.

Example Fix:

<span class="treelist-value">
    <f:switch expression="{setting.definition.type}">
        <f:case value="stringlist">
            <f:for each="{setting.value}" as="value" iteration="settingIterator">
                {value}{f:if(condition: settingIterator.isLast, else: ', ')}
            </f:for>
        </f:case>
        <f:defaultCase>
            {setting.value}
        </f:defaultCase>
    </f:switch>
</span>

Reviews 2

History 611

  1. Garvin Hicking commented and changed status Closed Needs Feedback <span data-processor="relativetime" data-value="2026-04-03T23:08:25+00:00" > 04/03/26, 23:08 </span>

    Did you accidentally close this? Sounds interesting and I would’ve asked if you’d like to contribute this as a gerrit patch, so it can be attributed to you?

  2. Michael Blunck commented and changed status Needs Feedback New <span data-processor="relativetime" data-value="2026-04-04T07:43:01+00:00" > 04/04/26, 07:43 </span>

    Yes, exactly. I closed it initially because I thought a local extension was at fault, but I’ve now reproduced it in a clean environment—the stringlist type definitely triggers the Fluid exception.

    I’d be happy to contribute a Gerrit patch for this!

  3. Garvin Hicking commented <span data-processor="relativetime" data-value="2026-04-04T08:45:44+00:00" > 04/04/26, 08:45 </span>

    Great :) Hit me up on slack if I can help :)

  4. Michael Blunck commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-04-13T15:05:09+00:00" > 04/13/26, 15:05 </span>

    Applied in changeset commit:2b39e8016bf6a3877c808f6b50cfa4eaefeac81c.