Review main Abandoned

93106[BUGFIX] Respect disabled pages in form navigation

Josua Vogel CR 0 V 0 Normal +204 −17 updated 03/16/26, 21:58

Commit message

The methods `getNextPage()` and `getPreviousPage()` of
`FormRuntime` did not check the `enabled` rendering option
of form pages. This caused the "Next" button to be rendered
instead of the "Submit" button when the next page was
disabled (e.g. via `renderingOptions.enabled: false` or
through variants).

The Fluid template `Navigation.fluid.html` uses
`{form.nextPage}` to decide whether to show a "Next" or
"Submit" button. Since `getNextPage()` returned disabled
pages, the form incorrectly displayed "Next" even on what
was effectively the last enabled page.

The fix delegates `getNextPage()` to `getNextEnabledPage()`
and `getPreviousPage()` to `getPreviousEnabledPage()`, so
disabled pages are now properly skipped in the navigation.

Additionally, `getNextEnabledPage()` is updated to use the
`isEnabled()` method consistently, matching the pattern
already used in `getPreviousEnabledPage()`.

Review

  • Code review CR 0
  • Verified V 0
    • core-ci +1 CI

Issues 1

Files 2

Review log 57

  1. Josua Vogel uploaded patch set 1 03/06/26, 12:26

  2. Josua Vogel updated the commit message in patch set 2 03/06/26, 12:27

  3. Josua Vogel commented on patch set 2 03/06/26, 12:27

    Please note, that I attached a test form definition at the forge issue
  4. core-ci voted on patch set 1 V -1 03/06/26, 13:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97495

  5. core-ci voted on patch set 2 V +1 03/06/26, 13:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97496

  6. Josua Vogel marked it work in progress 03/07/26, 07:07

  7. Josua Vogel abandoned the change 03/16/26, 21:58