Review main Ready for review Quiet

96804[BUGFIX] Fix scheduler task validation FlashMessages conversion

Garvin Hicking CR 0 V 0 Expert +1136 −6 updated 10/17/26, 20:45

Commit message

In case the new TCA-based EXT:scheduler task creation has failed
user input, it should convert FlashMessages to actual errors, but
missed processing these correctly.

This patch adjusts the logic on how these messages are handled,
so that proper forwarding can occur.

Alongside, two further improvements are made:

1. The docs are adapted to point out how validation is supposed
   to work with the current implementation.

2. An EXT:styleguide example is added with a task that uses
   specific validation.

One caveat remains, and it is not really worth noting: In case
client-side validation and server-side validation are not in sync,
any server-side reported error will lead to FormEngine not displaying
the user-specified input for the follow-up redirect editing form,
but using persisted (or no data, for fresh objects) data. This will
lose all user input. For a fresh task that is about to be created,
it also results in a message `Invalid Task type:` because the
task type to be created is no longer forwarded to the form.

This can be addressed in a follow-up patch and is beyond the scope
of this patch.

To force server-side validation and manually bypass client-side
validation, use this JavaScript console trick in the styleguide
example (set the console scope to the "top" window, not the
"list_frame"!):

```
const doc = document.querySelector('#typo3-contentIframe').contentDocument;
const form = doc.querySelector('form[name="editform"]');
form.querySelector('input[type="hidden"][name$="[tx_styleguide_token_length]"]').value = '41';
const action = doc.createElement('input');
Object.assign(action, { type: 'hidden', name: '_savedok', value: '1' });
form.append(action);
form.submit();
```

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/04/96804/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/04/96804/1 && git cherry-pick FETCH_HEAD

Review

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

Merge conflicts 2

Issues 1

Files 24

Show 4 more files

Review log 12

  1. Garvin Hicking uploaded patch set 1 10/17/26, 20:37

  2. core-ci voted on patch set 1 V +1 10/17/26, 20:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111485