#111507Make the form editor null-safe
Description
The JavaScript of the form editor, the form manager and the form wizard reads values that can be missing at runtime without a check. Unlike the other backend modules it barely touches the DOM directly, so the errors do not come from element lookups.
The editor’s modules keep their state in file-level singletons that a bootstrap call assigns – the editor application, the configuration, the view model, the stage element – and declare them as if they were always set. The application state stack hands out undefined for every key, although each entry is seeded when a state is pushed. Most of the remaining places are optional properties of the editor configuration, which only the renderer selected for exactly that template ever reads: the configuration options of an editor, its select options, its view ports, the property collections of an element definition.
Some declarations are plainly wrong. createFormElement, buildPropertyPath, renderAbstractStageArea, createAndAddAbstractViewFormElementToolbar and addValidatorIdentifiersToFormElementProperty handle a missing argument in their first lines, yet declare those parameters as required, so every caller passes undefined into a type that does not admit it.
These places should get a guard or a fallback where the value can really be missing, and a correct declaration where it was wrong, so form compiles under strictNullChecks.
Reviews 2
History 14
-
Gerrit Code Review pushed patch set 9 for main to change 95430 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-19T12:06:39+00:00" > 11/19/26, 12:06 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 97845 <span data-processor="relativetime" data-value="2026-11-19T13:57:00+00:00" > 11/19/26, 13:57 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 97845 <span data-processor="relativetime" data-value="2026-11-19T14:01:53+00:00" > 11/19/26, 14:01 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-19T14:15:14+00:00" > 11/19/26, 14:15 </span>
Applied in changeset commit:32ffa6ff40866800714cca14e6248289a1be33ea.