#105974line breaks in settings.definitions.yaml are ignored
Description
It’s not possible to add a linebreak according to https://yaml-multiline.info/ and|or https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/CodingGuidelines/CglYaml.html
in my site set settings.definitions.yaml. In other yaml-contexts like form-framework \n is respected.
Reviews 4
Files 2
History 1530
Show 25 earlier messages
-
Garvin Hicking changed category <span data-processor="relativetime" data-value="2025-01-21T18:23:23+00:00" > 01/21/25, 18:23 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 87851 status
NewUnder Review <span data-processor="relativetime" data-value="2025-01-22T11:55:30+00:00" > 01/22/25, 11:55 </span> -
Oliver Hader commented and changed attached 105974-demo.png <span data-processor="relativetime" data-value="2025-01-22T11:57:31+00:00" > 01/22/25, 11:57 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 87851 <span data-processor="relativetime" data-value="2025-01-22T12:00:28+00:00" > 01/22/25, 12:00 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 87851 <span data-processor="relativetime" data-value="2025-01-22T18:03:41+00:00" > 01/22/25, 18:03 </span>
-
Oliver Hader commented and changed status
Under ReviewNeeds Feedback <span data-processor="relativetime" data-value="2025-01-23T15:14:19+00:00" > 01/23/25, 15:14 </span>The PoC at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87851 showed that there is no YAML parsing issue, but more a representation issue in the browser (since newlines are not automatically represented in HTML).
@ghi Mentioned, it could be fixed easily with CSS
white-space: pre—-
@wini2 Can you please describe where you wanted to use line-breaks in the site sets, or what you’re scenario was about? Thanks in advance!
-
wini2 no-lastname-given commented and changed attached site-sets01.jpg <span data-processor="relativetime" data-value="2025-01-23T23:37:49+00:00" > 01/23/25, 23:37 </span>
If a longer description/explanation is needed, line breaks could make it much easier to read. 105974-demo.png is the result I expect.
-
Gerrit Code Review pushed patch set 1 for main to change 87988 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2025-02-03T08:16:03+00:00" > 02/03/25, 08:16 </span> -
Garvin Hicking commented and changed status
Under ReviewNeeds Feedback <span data-processor="relativetime" data-value="2025-02-03T08:16:48+00:00" > 02/03/25, 08:16 </span>I’ve now pushed patch the following patch that sets ‘white-space: pre’. Please check if that would help you:
https://review.typo3.org/c/Packages/TYPO3.CMS/+/87988
[BUGFIX] Allow display of white-space in site settings descriptions -
Garvin Hicking changed status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2025-02-03T08:16:59+00:00" > 02/03/25, 08:16 </span> -
wini2 no-lastname-given commented <span data-processor="relativetime" data-value="2025-02-05T18:03:25+00:00" > 02/05/25, 18:03 </span>
Thanks for your response.
I’ve tested linebreaks in settings.definitions.yamlubsp.templateRootPath:
label: ‘Templates’
category: ubsp.templates
type: string
default: ‘EXT:ubsp/Resources/Private/ContentElements/Templates/‘
description: “Setting für eigenes SP. Weitere s. settings.yaml Some text.\nWith newline.\n\t\tTabbed.”works fine. But for categories it doesn’t work.
categories: ubsp: label: 'ub sitepackage' description: "Some text.\nWith newline.\n\t\tTabbed." ... -
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-02-05T19:23:19+00:00" > 02/05/25, 19:23 </span>
Thanks! Yes indeed, this needs to be set for each field where linebreaks could occur. Any chance you know of other fields like this?
-
wini2 no-lastname-given commented <span data-processor="relativetime" data-value="2025-02-05T21:04:17+00:00" > 02/05/25, 21:04 </span>
With a slightly additon in the typo3/sysext/backend/Resources/Public/Css/backend.css it should work.
.settings-category p {color: purple; white-space:pre;}
-
wini2 no-lastname-given commented <span data-processor="relativetime" data-value="2025-02-05T21:21:22+00:00" > 02/05/25, 21:21 </span>
I don’t know if white-space: pre is responsible that I get a horizontal scrollbar. Maybe
white-space: pre-wrap
would be a better choice.
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-02-05T21:56:03+00:00" > 02/05/25, 21:56 </span>
Very helpful, thanks, I will ammend the patch accordingly
-
Gerrit Code Review pushed patch set 2 for main to change 87988 <span data-processor="relativetime" data-value="2025-02-06T07:15:34+00:00" > 02/06/25, 07:15 </span>
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-02-06T07:16:09+00:00" > 02/06/25, 07:16 </span>
I’ve updated the patch and commit message, happy if you could check it (and maybe vote on the patch)
-
Gerrit Code Review pushed patch set 3 for main to change 87988 <span data-processor="relativetime" data-value="2025-02-06T08:26:39+00:00" > 02/06/25, 08:26 </span>
-
Benjamin Kott commented <span data-processor="relativetime" data-value="2025-02-06T09:25:05+00:00" > 02/06/25, 09:25 </span>
Please avoid solutions to this that include CSS od manual parsing.
If we want to extend the capabilities here, we should add Markdown support here with a reasonable subset.Please see https://quire.getty.edu/docs-v1/fundamentals/ for examples of Markdown in YAML.
-
Gerrit Code Review pushed patch set 1 for main to change 88050 <span data-processor="relativetime" data-value="2025-02-06T10:41:37+00:00" > 02/06/25, 10:41 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 88050 <span data-processor="relativetime" data-value="2025-02-06T11:17:25+00:00" > 02/06/25, 11:17 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 88050 <span data-processor="relativetime" data-value="2025-02-06T13:59:57+00:00" > 02/06/25, 13:59 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 88050 <span data-processor="relativetime" data-value="2025-02-06T14:08:43+00:00" > 02/06/25, 14:08 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 88050 <span data-processor="relativetime" data-value="2025-02-07T14:16:26+00:00" > 02/07/25, 14:16 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 88050 <span data-processor="relativetime" data-value="2025-02-07T14:20:34+00:00" > 02/07/25, 14:20 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 88050 <span data-processor="relativetime" data-value="2025-02-07T15:28:03+00:00" > 02/07/25, 15:28 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 88050 <span data-processor="relativetime" data-value="2025-02-09T06:14:07+00:00" > 02/09/25, 06:14 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88133 <span data-processor="relativetime" data-value="2025-02-10T11:22:30+00:00" > 02/10/25, 11:22 </span>
-
Benjamin Franzke commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-02-10T11:35:09+00:00" > 02/10/25, 11:35 </span>Applied in changeset commit:2a4e461635b3a90df50f6e19b661af9124ee5605.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:26:45+00:00" > 12/02/25, 14:26 </span>
In general, the YAML parser supports line breaks, e.g. when wrapped in quotes – e.g. @key: “first\nsecond\nthird”.
For site set definitions, those line breaks are however not reflected in the user interface.
I’ve added a short proof-of-concept change on review.typo3.org for the corresponding web component, now using a new
nl2brfunction to convert newlines to<br>.This might probably be a new generic
nl2brlit directive instead.105974-demo.png