Review main Merged

90526[BUGFIX] Ensure correct type of fluidAdditionalAttributes

Simon Praetorius CR +2 V +2 Normal +63 −1 updated 09/01/25, 08:20

Commit message

With #80301 the `fluidAdditionalAttributes` property has been
introduced, which can be used with all Form elements to pass
arguments to the resulting HTML tag, which is generated by
a `<f:form>`/`<f:form.*>` ViewHelper. These ViewHelpers all extend
the `AbstractTagBasedViewHelper`, which defines the argument
`additionalAttributes` as array and passes these attributes
through to the resulting tag.

The `fluidAdditionalAttributes` property might not be defined for
all elements of a form. Since there is no default value, the
resulting value derived from the form yaml file would just be
`null`, which would be fine since `additionalAttributes` is not
required.

However, the `fluidAdditionalAttributes` are processed by the
`<formvh:translateElementProperty>` ViewHelper before being
passed along. This leads to an invalid value for
`additionalArguments` because form's translation handling
always defaults to an empty string if a property is not defined.

This patch adjusts the form translation behavior slightly to
work properly for `fluidAdditionalAttributes`, which is the
only global property that is an array. When previously an empty
string would be returned, now an empty array is used.

Review

  • Code review CR +2 Done
    • Simon Praetorius +2
    • Garvin Hicking +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Simon Praetorius +2
    • Garvin Hicking +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 79

  1. Simon Praetorius uploaded patch set 1 08/31/25, 11:25

  2. core-ci voted on patch set 1 V +1 08/31/25, 11:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84089

  3. Garvin Hicking voted on patch set 1 CR +1 V +1 08/31/25, 11:45

  4. Simon Praetorius uploaded patch set 2 CR +1 V +1 08/31/25, 11:49

  5. core-ci voted on patch set 2 V +1 08/31/25, 11:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84091

  6. Garvin Hicking voted on patch set 2 CR +1 V +1 08/31/25, 11:58

  7. Simon Schaufelberger voted on patch set 2 CR +1 V +1 08/31/25, 12:34

  8. Simon Praetorius voted on patch set 2 CR +2 V +2 09/01/25, 08:13

  9. Simon Praetorius merged patch set 3 09/01/25, 08:20