Review main Merged

96863[BUGFIX] Do not load all tree items when opening a record

Matthias Vogel CR +2 V +2 Hard +428 −78 updated 11/13/26, 18:39

Commit message

Since empty relation fields are hidden in FormEngine, TcaSelectTreeItems
and TcaCategory resolved the full item list of their foreign table on
every form load, including the complete record of each item, just to
find out whether the field has any selectable item. The tree itself
is fetched afterwards via AJAX anyway. With several tree fields
pointing to a large table such as "pages", opening a record exhausted
the PHP memory limit.

The full item list is now built only for the AJAX request again. When
the form is opened, a limited query checks whether at least one
selectable record exists, respecting "keepItems", "removeItems",
workspace overlays and user restrictions. The result is handed over
to TcaColumnsRemoveEmptyRelations, while the configured items of the
field stay untouched.

Review

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

Issues 1

Files 6

Review log 1218

  1. Matthias Vogel uploaded patch set 1 10/19/26, 12:25

  2. Matthias Vogel uploaded patch set 2 10/19/26, 12:26

  3. core-ci voted on patch set 1 V +1 10/19/26, 12:37 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 2 (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111636

  4. core-ci voted on patch set 2 V +1 10/19/26, 12:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111637

  5. Matthias Vogel uploaded patch set 3 V +1 10/19/26, 17:41

  6. core-ci voted on patch set 3 V +1 10/19/26, 17:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111686

  7. Matthias Vogel uploaded patch set 4 V +1 10/19/26, 19:38

  8. core-ci voted on patch set 4 V +1 10/19/26, 19:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111706

  9. Matthias Vogel marked it ready for review 10/20/26, 16:48

  10. Matthias Vogel updated the commit message in patch set 5 V +1 10/28/26, 08:37

  11. core-ci voted on patch set 5 V +1 10/28/26, 08:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112686

  12. Benni Mack uploaded patch set 6 V +1 11/12/26, 21:42

  13. Benni Mack voted on patch set 6 CR +1 V +1 11/12/26, 21:45

  14. core-ci voted on patch set 6 V +1 11/12/26, 21:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114247

  15. Oli Bartsch voted on patch set 6 CR +1 V +1 11/13/26, 16:13

  16. Simon Schaufelberger voted on patch set 6 CR +1 V +1 11/13/26, 18:28

  17. Benni Mack voted on patch set 6 CR +2 V +2 11/13/26, 18:39

  18. Benni Mack merged patch set 7 11/13/26, 18:39