Review 14.3 Merged

96856[BUGFIX] Keep defVals after rejected new record

Garvin Hicking CR +2 V +2 Normal +99 −9 updated 10/19/26, 09:04

Commit message

When a DataHandler hook rejects a new record, the edit form is reloaded
with its default values ("defVals"), as these may carry the record
type. A new scheduler task, for example, would otherwise come back
without its task type.

The check for such an unpersisted record looked for "NEW" in the keys
of the edit configuration. These keys hold the page id of a new record
though, "NEW" never occurs there, so the default values were always
dropped. The check now looks for the "new" command instead.

As "Save & New" also leaves a "new" command in the edit configuration,
the default values are now kept there as well, so the next new record
starts with the same defaults, such as the record type.

The bug can easily be reproduced by creating a task of type
"System Status Update" and entering "no" as email address. That
passes FormEngine validation (....sigh...), but fails server-side.
With patch: Proper error message, default type and inputs now available
Without patch: Unhelpful error message "Invalid Task type:", input
               form that no longer can be saved due to missing type.

Review

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

Issues 2

Files 3

Review log 46

  1. Garvin Hicking commented on patch set 1 10/19/26, 08:00

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V -1 10/19/26, 08:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111600

  3. Garvin Hicking uploaded patch set 2 V -1 10/19/26, 08:40

    cgl
  4. core-ci voted on patch set 2 V +1 10/19/26, 08:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111605

  5. Garvin Hicking voted on patch set 2 CR +2 V +2 10/19/26, 09:04

  6. Garvin Hicking merged patch set 3 10/19/26, 09:04