Review main Merged

97312[BUGFIX] Keep page tree refresh flag of nested DataHandler runs

Benni Mack CR +2 V +2 Normal +76 −8 updated 11/09/26, 08:32

Commit message

DataHandler copies, localizes and versions records in nested runs.
When they created records in a workspace or changed pages, only the
nested instance set pagetreeNeedsRefresh, so the DataHandler that was
called reported that no page tree refresh is needed, for example
after copying content with inline children in a workspace. The flag
is now taken over from nested runs, like their error log.

With a reliable flag, the edit form, the visibility toggle of the
list module and the "tce_db" endpoint used by the clipboard and the
modules no longer repeat the conditions of DataHandler and only
evaluate the flag. The edit form now also refreshes the page tree for
commands on pages that are sent without data. The "tce_db" endpoint
now refreshes it for records created in a workspace, and no longer
for page fields that are not shown in the page tree.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Daniel Windloff +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Daniel Windloff +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 1518

  1. Benni Mack uploaded patch set 1 11/03/26, 08:05

  2. core-ci voted on patch set 1 V +1 11/03/26, 08:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113128

  3. Daniel Windloff commented on patch set 1 11/03/26, 08:26

    `EditDocumentController` evaluates `$dataHandler->pagetreeNeedsRefresh && (isset($dataMap['pages']) || $beUser->workspace !== 0 && !empty($dataMap))` to check if the page tree refresh is needed. As the datamap is also in the subinstance, transferring the flag might be enough. Besides that, I think `pagetreeNeedsRefresh` should not be part of DataHandler. Evaluating the NEW placeholder and history may remove the flag entirely, as the logic should be in the controller and not in the persistence class.
  4. Oliver Klee voted on patch set 1 V +1 11/03/26, 11:17

  5. Benni Mack commented on patch set 1 11/04/26, 05:59

    Reply

    in general I agree, right now, I'm mainly fixing a leftover problem so we can get rid of this option properly later-on...
  6. Benni Mack uploaded patch set 2 V +1 11/04/26, 07:24

  7. Benni Mack commented on patch set 2 11/04/26, 07:24

    Reply

    I did clean up the places where I think can also be simplified now
  8. core-ci voted on patch set 2 V +1 11/04/26, 07:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113253

  9. Georg Ringer voted on patch set 2 CR +1 V +1 11/04/26, 09:16

  10. Daniel Windloff commented on patch set 2 11/05/26, 19:16

    The `SimpleDataHandlerController` does not use the flag at all. For instance, when editing a live record within a workspace (which triggers the auto-creation of that workspace) the page tree is reloaded via `EditDocumentController`. Conversely, when a record is copied in a workspace, the page tree is not reloaded, even though the page record is marked after a reload of the page tree. Furthermore, the `DataMapProcessor` does not pass the state of the page tree refresh back to the parent `DataHandler`. However, the use cases for this would likely be quite limited.
  11. Benni Mack uploaded patch set 3 CR +1 V +1 11/07/26, 21:49

  12. Benni Mack commented on patch set 3 11/07/26, 21:49

    Reply

    Thanks - you are right: SimpleDataHandlerController now only evaluates the flag as well. That also fixes two cases: records created in a workspace via tce_db now refresh the page tree, and changing a page field that is not shown in the tree no longer does.
  13. core-ci voted on patch set 3 V +1 11/07/26, 22:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113577

  14. Daniel Windloff voted on patch set 3 CR +1 V +1 11/07/26, 22:01

  15. Simon Schaufelberger voted on patch set 3 CR +1 V +1 11/08/26, 19:44

  16. Georg Ringer voted on patch set 3 CR +1 V +1 11/09/26, 08:26

  17. Benni Mack voted on patch set 3 CR +2 V +2 11/09/26, 08:32

  18. Benni Mack merged patch set 4 11/09/26, 08:32