Describe the bug
When using the new native RTE support for form element labels (introduced in TYPO3 v14 LTS),
internal links inserted via the RTE (e.g. in a Checkbox label for a "I accept the terms" use case)
are output raw in the JSON response instead of being resolved to their actual frontend URLs.
Raw output (actual):
{
"label": "<p>I accept the <a href=\"t3://page?uid=1\">terms and conditions</a>.</p>"
}
Expected output:
{
"label": "<p>I accept the <a href=\"/home\">terms and conditions</a>.</p>"
}
The t3://page?uid=X URI scheme is TYPO3's internal link format and must be resolved through
lib.parseFunc_RTE / typolink before being sent to the frontend. In normal Fluid-rendered
pages this happens automatically, but the FormDefinitionDecorator outputs form element labels
as plain strings without passing them through any link-resolving pipeline.
To Reproduce
- Set up TYPO3 v14 LTS with EXT:headless
- Create a form with a Checkbox element
- In the Checkbox label field, use the RTE to add a link to an internal page (via the link browser)
- Fetch the form JSON via the headless API
- Observe that
label contains the raw t3://page?uid=X string instead of a resolved URL
Expected behavior
The FormDefinitionDecorator (or the relevant form processing layer) should pass RTE-enabled
label fields through lib.parseFunc_RTE so that internal t3:// links are resolved to proper
frontend URLs, just as they are for regular RTE content elements.
This affects at least:
Checkbox label (the primary RTE label field in v14)
- Potentially
StaticText and confirmation message finisher content, which also gained RTE
support in v14
Possible fix
A custom FormDefinitionDecorator can work around this today by running labels through
ContentObjectRenderer::parseFunc() with lib.parseFunc_RTE. However, this should ideally
be handled by the default decorator out of the box, since any form using the new v14 RTE label
feature will be broken in headless mode without it.
TYPO3 version and EXT:headless version
- TYPO3: v14 LTS
- EXT:headless: latest (main branch)
Additional context
Describe the bug
When using the new native RTE support for form element labels (introduced in TYPO3 v14 LTS),
internal links inserted via the RTE (e.g. in a Checkbox label for a "I accept the terms" use case)
are output raw in the JSON response instead of being resolved to their actual frontend URLs.
Raw output (actual):
{ "label": "<p>I accept the <a href=\"t3://page?uid=1\">terms and conditions</a>.</p>" }Expected output:
{ "label": "<p>I accept the <a href=\"/home\">terms and conditions</a>.</p>" }The
t3://page?uid=XURI scheme is TYPO3's internal link format and must be resolved throughlib.parseFunc_RTE/typolinkbefore being sent to the frontend. In normal Fluid-renderedpages this happens automatically, but the
FormDefinitionDecoratoroutputs form element labelsas plain strings without passing them through any link-resolving pipeline.
To Reproduce
labelcontains the rawt3://page?uid=Xstring instead of a resolved URLExpected behavior
The
FormDefinitionDecorator(or the relevant form processing layer) should pass RTE-enabledlabel fields through
lib.parseFunc_RTEso that internalt3://links are resolved to properfrontend URLs, just as they are for regular RTE content elements.
This affects at least:
Checkboxlabel (the primary RTE label field in v14)StaticTextand confirmation message finisher content, which also gained RTEsupport in v14
Possible fix
A custom
FormDefinitionDecoratorcan work around this today by running labels throughContentObjectRenderer::parseFunc()withlib.parseFunc_RTE. However, this should ideallybe handled by the default decorator out of the box, since any form using the new v14 RTE label
feature will be broken in headless mode without it.
TYPO3 version and EXT:headless version
Additional context
https://wwagner.net/en/blog/a/typo3-v14-rich-text-editor-in-the-form-framework-no-more-workarounds-for-checkbox-labels
https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Rte/RenderingInTheFrontend/Index.html
FormDefinitionDecoratorand setrenderingOptions.formDecoratorin the form YAML to point to it