Skip to content

Forms: RTE label links (t3://page?uid=X) not resolved in Checkbox and other form elements (TYPO3 v14) #894

Description

@dextar47

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

  1. Set up TYPO3 v14 LTS with EXT:headless
  2. Create a form with a Checkbox element
  3. In the Checkbox label field, use the RTE to add a link to an internal page (via the link browser)
  4. Fetch the form JSON via the headless API
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions