Review main Merged

94131[BUGFIX] Guard getProperties() call in TranslationService with instanceof check

Josua Vogel CR +2 V +2 Easy +7 −19 updated 05/28/26, 20:38

Commit message

TranslationService::translateFormElementError() accepts a
RootRenderableInterface as its $element parameter, but unconditionally
called $element->getProperties(), which is only defined in
FormElementInterface (a sub-interface of RootRenderableInterface).

When the method is called with a FormRuntime instance — which implements
RootRenderableInterface but not FormElementInterface — this caused a
fatal error, because FormRuntime does not have getProperties().

The validationErrorMessages feature read from getProperties() is
meaningful only for concrete form elements, not for the form root.
The fix wraps the getProperties() access in an instanceof
FormElementInterface check, consistent with the pattern already
established in translateFormElementValue().

The two functional tests covering this code path had been skipped with
markTestSkipped() referencing this issue (#100477). The skip markers
are now removed.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 810

  1. Josua Vogel uploaded patch set 1 05/22/26, 12:30

  2. core-ci voted on patch set 1 V -1 05/22/26, 12:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102355

  3. Oliver Klee commented on patch set 1 05/25/26, 07:29

    This fixes some PHPStan warnings (yay!). So we'll need to update the baseline.
  4. Josua Vogel uploaded patch set 2 V -1 05/26/26, 05:44

  5. core-ci voted on patch set 2 V +1 05/26/26, 05:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102428

  6. Oliver Klee voted on patch set 2 CR +1 V +1 05/26/26, 06:59

  7. Christian Kuhn voted on patch set 2 CR +1 V +1 05/28/26, 20:16

  8. Stefan Bürk voted on patch set 2 CR +1 V +1 05/28/26, 20:16

  9. Christian Kuhn voted on patch set 2 CR +2 V +2 05/28/26, 20:18

  10. Christian Kuhn merged patch set 3 05/28/26, 20:38