Review main Merged

92233[TASK] Centralize and streamline open documents functionality

Benni Mack CR +2 V +2 Expert +975 −397 updated 12/31/25, 10:18

Commit message

This change refactors the "open documents" functionality
to be more consistent after more than 20 years of being "just there".

Open Documents = documents that are opened by FormEngine of the current
users without having explicitly saved or closed, are stored in the
backend users' session storage "uc".

Previously, open documents were identified by an MD5 hash of the entire
edit session parameters. This meant the same record could appear multiple
times in the list if opened with different parameters, and multiple records
edited together would only show as a single entry.

This way, TYPO3 Backend now tracks open documents properly:

- Only one entry is added even if a record is edited multiple times
- New records are tracked as well and can be utilized

In addition, instead of a numeric array list, readonly
OpenDocument objects are used so they can be of use
in multiple places later-on as well as a better separation
of concerns with repository pattern.

Next to extracting a lot the logic out of EditDocumentController,
this change allows to eventually change the storage format
to a native database table at a later stage.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • Georg Ringer +1
    • Jochen Roth +1
  • Verified V +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • Georg Ringer +1
    • Jochen Roth +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 1115

  1. Benni Mack uploaded patch set 1 12/30/25, 16:20

  2. Benni Mack updated the commit message in patch set 2 12/30/25, 16:20

  3. core-ci voted on patch set 1 V -1 12/30/25, 16:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92810

  4. core-ci voted on patch set 2 V -1 12/30/25, 16:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92811

  5. Benni Mack uploaded patch set 3 V -1 12/30/25, 17:38

  6. core-ci voted on patch set 3 V -1 12/30/25, 17:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92814

  7. Benni Mack uploaded patch set 4 V -1 12/30/25, 18:35

  8. core-ci voted on patch set 4 V +1 12/30/25, 18:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92816

  9. Jochen Roth voted on patch set 4 CR +1 V +1 12/30/25, 21:59

  10. Georg Ringer voted on patch set 4 CR +1 V +1 12/31/25, 06:12

  11. Josef Glatz commented on patch set 4 CR -1 12/31/25, 08:57

    Works as expected! Just a note/question on the legacy support part

    OpenDocument.php:52

    Loading legacy entries (before applying this patch and running `cache:flush`) does not show any of the legacy records in my dev-main instance. After applying the patch the opendocs dropdown is empty and just filled with new opened records. From my POV we do not need any legacy support at all: upgrading a TYPO3 instance to an new major version includes always the deletion of the user settings as prefered/musthave task. What do you think?
  12. Benni Mack commented on patch set 4 12/31/25, 09:42

    OpenDocument.php:52 Reply

    Seems like the migration is not perfect yet. Quick side note: I kept this part in for the time being, as it fataled when trying to re-use the old data. I hope to change the storage mechanism (= not utilizing the UC), which is now easy, because it's encapsulated in the repository. I'd like to do this separately - and until then I try to avoid fatal errors for some devs with ugly content in it (e.g. I had "Edit multiple content elements" in it)
  13. Josef Glatz commented on patch set 4 CR +1 V +1 12/31/25, 10:06

    OpenDocument.php:52 Reply

    Acknowledged
  14. Benni Mack voted on patch set 4 CR +2 V +2 12/31/25, 10:18

  15. Benni Mack merged patch set 5 12/31/25, 10:18