Review 14.3 Merged

97814[TASK] Make the file list and the RTE null-safe

Benjamin Kott CR +2 V +2 Normal +118 −110 updated 11/19/26, 08:26

Commit message

Fourth step towards strictNullChecks, covering filelist and
rte_ckeditor. With this every extension except backend, form and
install is done.

The file list mostly reads a resource that carries a nullable uid,
metaUid, url and size, and passed those on as if they were always
there. Where a caller genuinely tolerates the absence, the signature
now says so, which is why the context menu, the element browser and
the icon API gained a nullable parameter rather than every call site
gaining a cast. `FileListActionDetail.event` was declared as an Event
although the context menu actions have always dispatched it as null.
The element browser no longer inserts a file it cannot identify by
its uid.

The RTE mostly talks to CKEditor 5, whose API returns null or
undefined in many places the plugin treats as certain: a command that
may not be registered, a selection that may be empty, a marker that
may not resolve. Where the plugin's own contract guarantees the value,
it is left for the non-null assertion; where it can be missing, the
plugin falls back, such as the link balloon attaching to the selection
when the highlight marker has no view elements.

One thing is deliberately left as it is. The editable element styles
read `Number(assignment)` before `assignment` is assigned, so a
numeric string never reached the branch appending `px`. The dead
condition is removed and the behaviour kept, with a note - correcting
it changes the rendered size and belongs in its own change.

The non-null assertions this step relies on are added with
strictNullChecks itself, as no-unnecessary-type-assertion reports
every such assertion until the option is enabled.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
  • Verified V +2 Done
    • Benjamin Kott +2
    • core-ci +1 CI

Issues 2

Files 33

Show 13 more files

Review log 57

  1. Benjamin Kott commented on patch set 1 11/19/26, 07:51

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/backend/Resources/Public/JavaScript/element-browser.js * typo3/sysext/filelist/Resources/Public/JavaScript/browse-files.js * typo3/sysext/filelist/Resources/Public/JavaScript/context-menu-actions.js * typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/plugin/typo3-link.js * typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/rte-link-browser.js
  2. Benjamin Kott uploaded patch set 2 11/19/26, 07:58

  3. core-ci voted on patch set 2 V +1 11/19/26, 08:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114969

  4. core-ci voted on patch set 1 V -1 11/19/26, 08:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114968

  5. Benjamin Kott commented on patch set 2 11/19/26, 08:24

    This change is ready for review.
  6. Benjamin Kott voted on patch set 2 CR +2 V +2 11/19/26, 08:26

  7. Benjamin Kott merged patch set 3 11/19/26, 08:26