Issue Task Resolved

#111501Make the file list and the RTE null-safe

Benjamin Kott 11/18/26, 22:17 updated 11/19/26, 08:30

Description

The JavaScript of the file list reads values that can be missing at runtime without a check. Its resources carry a nullable uid, metaUid, url and size that are passed on as if they were always set, dataset attributes and DataTransfer are used unchecked, and FileListActionDetail.event is declared as an Event although the context menu actions dispatch it as null. The context menu, the element browser and the icon API are called with null for parameters that do not declare it.

The CKEditor 5 integration does the same with the editor API, which returns null or undefined in many places the plugins treat as certain: a command that may not be registered, a selection that may be empty, a schema definition or a marker that may not resolve. When the highlight marker of the link plugin has no view elements, the balloon position is computed from an empty list.

These places should get a guard or a fallback where the value can really be missing, so filelist and rte_ckeditor compile under strictNullChecks.

Reviews 2

History 14

  1. Benjamin Kott commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-19T08:30:18+00:00" > 11/19/26, 08:30 </span>

    Applied in changeset commit:52f0bd944a3090eb5409281866460909c0e4f345.