Review main Merged

93562[BUGFIX] Fix "Create new form" button in empty-state infobox

Josua Vogel CR +2 V +2 Easy +15 −13 updated 04/08/26, 19:04

Commit message

The "Create new form" button inside the empty-state infobox of the
Forms backend module does nothing when clicked. Only the docheader
button works. This is a regression from the jQuery removal.

The root cause is that `newFormSetup()` in `view-model.ts` uses
`document.querySelector()` which returns only the first matching
element — the docheader button. The second button rendered inside
the `<f:be.infobox>` never receives a click event listener.

The fix changes `querySelector()` to `querySelectorAll().forEach()`,
consistent with all other setup functions in the same file
(`removeFormSetup`, `duplicateFormSetup`, `showReferencesSetup`)
which already iterate over all matching elements. Additionally,
`e.preventDefault()` is added to suppress the default anchor
navigation.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Sebastian Michaelsen +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Sebastian Michaelsen +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 69

  1. Josua Vogel uploaded patch set 1 04/08/26, 07:13

  2. core-ci voted on patch set 1 V -1 04/08/26, 07:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99740

  3. Sebastian Michaelsen voted on patch set 1 CR +1 V +1 04/08/26, 07:38

  4. core-ci commented on patch set 1 04/08/26, 07:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99740

  5. Josua Vogel rebased onto patch set 2 CR +1 V +1 04/08/26, 09:13

  6. core-ci voted on patch set 2 V +1 04/08/26, 09:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99749

  7. Sebastian Michaelsen voted on patch set 2 CR +1 V +1 04/08/26, 09:30

  8. Garvin Hicking voted on patch set 2 CR +2 V +2 04/08/26, 19:04

  9. Garvin Hicking merged patch set 3 04/08/26, 19:04