Review 14.3 Merged

94878[BUGFIX] Preserve option order of DB-stored forms on MySQL

Oli Bartsch CR +2 V +2 Hard +321 −3 updated 07/22/26, 08:58

Commit message

Multi-value form elements (SingleSelect, MultiSelect, RadioButton,
MultiCheckbox) persist their "options" as an associative map keyed
by option value. json_encode() of such a map produces a JSON
object, and MySQL's native JSON column type does not guarantee
that a JSON object's member order survives a write/read round
trip, unlike JSON array element order, which is preserved
reliably. As a result, reordering a select element's options in
the form editor appeared to save correctly, but reverted to the
previous order on the next reload.

This adds JsonObjectKeyOrderPreserver, which wraps order-sensitive
"options" maps in an array-based structure before persisting the
form definition to the database, and unwraps it again on read
using the explicit order list rather than relying on the object's
member order.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
  • Verified V +2 Done
    • Oli Bartsch +2
    • core-ci +1 CI

Issues 2

Files 5

Review log 34

  1. Oli Bartsch commented on patch set 1 07/22/26, 08:50

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 07/22/26, 08:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105153

  3. Oli Bartsch voted on patch set 1 CR +2 V +2 07/22/26, 08:58

  4. Oli Bartsch merged patch set 2 07/22/26, 08:58