Review 13.4 Merged

93196[BUGFIX] Use empty stepType in variant conditions when currentPage is null

Josua Vogel CR +2 V +2 Normal +165 −3 updated 03/16/26, 07:21

Commit message

The condition resolver in FormRuntime::getConditionResolver() used a
fallback to the first form page (getPageByIndex(0)) when currentPage
was null. This caused the `stepType` variable to incorrectly resolve
to "Page" (the type of the first page) in two scenarios:

1. During FormRuntime::initialize(), where processVariants() is called
   before initializeCurrentPageFromRequest() sets the current page.
   At this point currentPage is always null, so stepType was always
   evaluated as "Page" regardless of the actual target page.

2. In the finisher context, where currentPage is null because the last
   page has been submitted. Here stepType was also incorrectly set to
   "Page" instead of an empty string.

As a result, variant conditions like `stepType == "Page"` would
incorrectly match on SummaryPage steps and during finisher execution,
causing elements with `enabled: false` and a variant that sets
`enabled: true` for `stepType == "Page"` to be shown everywhere.

The fix removes the fallback to getPageByIndex(0) and instead sets
both stepIdentifier and stepType to empty strings when currentPage
is null. This ensures variant conditions based on stepType only match
when the form is actually on a page of the corresponding type.

Review

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

Issues 1

Files 2

Review log 68

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

  2. Josua Vogel marked it work in progress 03/16/26, 06:53

  3. Josua Vogel uploaded patch set 2 03/16/26, 06:55

  4. Josua Vogel marked it ready for review 03/16/26, 06:56

  5. core-ci voted on patch set 1 V -1 03/16/26, 07:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97984

  6. core-ci voted on patch set 2 V +1 03/16/26, 07:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97985

  7. Georg Ringer voted on patch set 2 CR +2 V +2 03/16/26, 07:21

  8. Georg Ringer merged patch set 3 03/16/26, 07:21