Review main Merged

95397[TASK] Register "href", "src" and "alt" on Fluid ViewHelpers

Benjamin Kott CR +2 V +2 Hard +310 −168 updated 08/26/26, 05:30

Commit message

The ViewHelpers f:asset.css, f:asset.script and f:image read the
arguments "href", "src" and "alt" from the tag attributes instead
of registering them. They are therefore missing from the generated
XSD schema and from the ViewHelper reference, which is why IDEs
report them as unknown attributes.

All three are now registered as optional string arguments.
Registered arguments no longer reach the tag builder, so the asset
ViewHelpers take the file from the arguments first and still fall
back to the tag attributes, which keeps passing it through
additionalAttributes working. An empty value is treated as no file
at all, so the tag children stay rendered as inline CSS or
JavaScript.

The asset ViewHelpers render unchanged output, since both
attributes are removed before the asset is handed to the
AssetCollector. For f:image an explicitly given "alt" now appears
after "src", "width" and "height" instead of first, which is the
position the fallback to the image metadata has always used.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Markus Klein +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Markus Klein +1
    • core-ci +1 CI

Issues 1

Files 9

Review log 57

  1. Benjamin Kott uploaded patch set 1 08/24/26, 16:20

  2. core-ci voted on patch set 1 V +1 08/24/26, 16:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107040

  3. Benjamin Kott uploaded patch set 2 V +1 08/24/26, 16:29

  4. core-ci voted on patch set 2 V +1 08/24/26, 16:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107042

  5. Markus Klein voted on patch set 2 CR +1 V +1 08/25/26, 19:06

  6. Georg Ringer voted on patch set 2 CR +2 V +2 08/26/26, 05:30

  7. Georg Ringer merged patch set 3 08/26/26, 05:30