Issue Bug Closed

#106470Form element translation arguments does not work

Andrey Aksenov 04/01/25, 10:30 updated 04/01/25, 19:13

Description

The form element translation arguments functionality (https://docs.typo3.org/c/typo3/cms-form/main/en-us/I/Concepts/FrontendRendering/Index.html#concepts-frontendrendering-translation-arguments) stopped working in TYPO3 version 13, everything worked in TYPO3 version 12.
In form yaml:

...
              fieldGDRPArguments:
                identifier: gdrp
                type: Checkbox
                label: ''
                properties:
                  fluidAdditionalAttributes:
                    required: required
                validators:
                  - identifier: NotEmpty
...

In locallang.xlf:

...

            <trans-unit id="orderForm.element.gdrp.properties.label">
                <source><![CDATA[
                I agree to the <a href="%s" target="_blank">terms and conditions</a>
                ]]></source>
            </trans-unit>
...

in setup.typoscript:

plugin.tx_form {
    settings {
        formDefinitionOverrides {
            orderForm {
                renderables {
                    0 {
                        renderables {
                            1 {
                                renderables {
                                    2 {
                                        renderables {
                                            fieldGDRPArguments {
                                                renderingOptions {
                                                    translation {
                                                        arguments {
                                                            label {
                                                                0 = TEXT
                                                                0.typolink {
                                                                    # Terms and conditions page, could be
                                                                    # set also via TypoScript constants
                                                                    parameter = {$aksenovaa.seo.copyright}
                                                                    returnLast = url
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }

                                        }
                                    }
                                }
                            }
                        }
                    }
                }
...

The form element translation arguments functionality stopped working in TYPO3 version 13, everything worked in TYPO3 version 12.
This whole bundle worked fine in version 12. Except for the fact that there were %s left at the end of the generated URL…..
When upgrading to version 13, the %s arguments are not substituted from TS in the link. TS itself works – I checked.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.