Review main Merged

91712[BUGFIX] Ensure f:*.action VHs use current page if pageUid is empty

Moritz Ngo CR +2 V +2 Easy +30 −2 updated 11/18/25, 13:12

Commit message

Change #107956 accidentally changed behavior of the `f:*.action`
viewhelpers in terms of pageUid handling within Extbase context.
Before the change an empty pageUid attribute (`""`) would cause
to fall back to the current page.

After the change this was treated as invalid page,
causing the whole `a` tag to vanish.

This patch restores the former behavior and documents this with a test.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Markus Klein +1
    • Moritz Ngo +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Markus Klein +1
    • Moritz Ngo +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 2126

Show 1 earlier messages
  1. Moritz Ngo uploaded patch set 1 11/17/25, 14:46

  1. Moritz Ngo marked it ready for review 11/17/25, 14:47

  2. Oliver Klee updated the commit message in patch set 2 11/17/25, 14:52

  3. core-ci voted on patch set 1 V -1 11/17/25, 14:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89947

  4. Moritz Ngo uploaded patch set 3 11/17/25, 14:57

  5. core-ci voted on patch set 2 V -1 11/17/25, 15:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89948

  6. core-ci voted on patch set 3 V -1 11/17/25, 15:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89949

  7. Markus Klein commented on patch set 3 11/17/25, 15:24

    Thanks for your patch. I'll take a look at it. First quick look tells me that you do a bit too much. The pageType-Handling must not be changed, as this is breaking. We have a dedicated patch for this https://forge.typo3.org/issues/107347
  8. Chris Müller commented on patch set 3 11/17/25, 15:24

    PageViewHelper.php:185

    This can be shortened with: $pageUid = (int)($arguments['pageUid'] ?? 0); also the other isset checks.
  9. Markus Klein commented on patch set 3 CR -1 11/17/25, 15:47

    PageViewHelper.php:185 Reply

    Please, no further changes with this fix. This change alone breaks things again! "pageUid" has a default value of `null`, which means "preserve current page", aka `"current"` in Typolink syntax. Casting this to 0 may have side-effects.
  10. Chris Müller commented on patch set 3 11/17/25, 16:33

    PageViewHelper.php:185 Reply

    Acknowledged
  11. Markus Klein uploaded patch set 4 CR -1 V -1 11/18/25, 10:12

  12. Markus Klein commented on patch set 4 11/18/25, 10:13

    Reply

    Done
  13. core-ci voted on patch set 4 V +1 11/18/25, 10:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90006

  14. Moritz Ngo voted on patch set 4 CR +1 V +1 11/18/25, 10:22

  15. Christian Kuhn voted on patch set 4 CR +1 V +1 11/18/25, 11:20

  16. Oliver Klee updated the commit message in patch set 5 CR +1 V +1 11/18/25, 11:30

  17. Christian Kuhn commented on patch set 5 CR +1 V +1 11/18/25, 11:36

    would be great to see a vote from Markus.
  18. core-ci voted on patch set 5 V +1 11/18/25, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90013

  19. Markus Klein voted on patch set 5 CR +1 V +1 11/18/25, 11:58

  20. Christian Kuhn voted on patch set 5 CR +2 V +2 11/18/25, 11:59

  21. Ayke Halder commented on patch set 5 CR -1 11/18/25, 12:13

    ActionViewHelper.php:194

    This would show the real intention "not use parameter on empty string". ```suggestion $pageUid = (isset($arguments['pageUid']) && $arguments['pageUid'] !== '') ? (int)$arguments['pageUid'] : null; ```
  22. Moritz Ngo commented on patch set 5 CR +1 V +1 11/18/25, 12:13

    looking good and work's like charm :)
  23. Markus Klein commented on patch set 5 11/18/25, 12:14

    ActionViewHelper.php:194 Reply

    Please, this is a regression fix. Let's keep it this way. I'm rewriting this whole stuff anyway with https://review.typo3.org/c/Packages/TYPO3.CMS/+/90502
  24. Ayke Halder commented on patch set 5 CR 0 11/18/25, 12:23

    ActionViewHelper.php:194 Reply

    Acknowledged
  25. Christian Kuhn merged patch set 6 11/18/25, 13:12