Review main Merged

36034[TASK] Only refresh pagetree on certain changes to pages

Stefan Neufeind CR +2 V +2 Easy +42 −4 updated 02/16/15, 16:40

Commit message

Pagetree only needs to refresh on changes to the
pages-table, and even there only when certain fields change.
checkSimilar in the DataHandler (enabled by default) already
compares current and new values to detect which fields really
change.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Mathias Schreiber +1
    • Christian Kuhn +1
  • Verified V +2
    • Stefan Neufeind +2
    • Mathias Schreiber +1
    • Christian Kuhn +1

Issues 1

Files 2

Review log 33

Show 8 earlier messages
  1. Stefan Neufeind uploaded patch set 1 01/16/15, 01:02

  2. Stefan Neufeind commented on patch set 1 01/16/15, 01:05

    Currently the pagetree refreshes on *all* update-operations! With a large pagetree, with multiple levels, that can result in a huge amount of refreshes (for multiple levels).
  3. Georg Ringer commented on patch set 1 01/16/15, 06:17

    DataHandler.php:318

    I am missing the following field: module. and why raelly public property?
  4. Stefan Neufeind commented on patch set 1 CR -1 01/16/15, 08:21

    We have a list of fields in PageTreeView already

    DataHandler.php:318 Reply

    Idea was that we might (later) need to be able for other parts to extend the list.
  5. Stefan Neufeind uploaded patch set 2 01/16/15, 09:03

  6. Stefan Neufeind commented on patch set 2 01/16/15, 09:03

    Use fieldArray from the PageTreeView now. It should know which fields it relies on.
  7. Stefan Neufeind commented on patch set 2 01/16/15, 09:11

    As an alternative we could make the pagetree hook itself into hook_processDatamap_afterDatabaseOperations() or so. But imho that makes life harder than necessary. If somebody has a better idea how to solve the coupling of the parts involved, feel free push a new patch-set.
  8. Mathias Schreiber uploaded patch set 3 01/25/15, 18:07

  1. Mathias Schreiber commented on patch set 3 CR +1 V +1 01/25/15, 18:08

    Added nav_title to fieldlist because you can configure showing the nav_title via TSconfig
  2. Christian Kuhn commented on patch set 3 01/25/15, 19:24

    gnaa, PageTreeView is on my list of to-be-deprecated classes with my current tree works ... but since the patch is there and it solves the problem for now, mmmh.
  3. Christian Kuhn commented on patch set 3 CR -1 01/25/15, 19:25

    working on it.
  4. Christian Kuhn commented on patch set 3 01/25/15, 20:14

    Reasons not to use PageTreeView in DataHandler: * This adds a dependency from ext:core to ext:backend * $fieldArray is used in PageTreeView to determine the list of fields that should by default be fetched from DB for display. This has nothing to do with a list of fields that should trigger a refresh of the pageTree
  5. Christian Kuhn commented on patch set 2 01/25/15, 20:16

    Actually, I prefer the "hardcoded in DataHandler" solution from patch set 1 in this specific case.
  6. Christian Kuhn uploaded patch set 4 01/25/15, 20:21

  7. Christian Kuhn commented on patch set 4 01/25/15, 20:22

    re-pushed set 1 but added nav_title to the list of fields.
  8. Christian Kuhn uploaded patch set 5 01/25/15, 20:25

  9. Christian Kuhn commented on patch set 4 01/25/15, 20:26

    added field module ("contains plugin") to the list - this field often changes the icon in page tree.
  10. Christian Kuhn commented on patch set 5 CR +1 V +1 01/25/15, 20:28

    Ok, fine with me. Seems to work good. BTW: Thanks for the patch, the constant reloads of page tree on changing "anything" were really painful.
  11. Mathias Schreiber voted on patch set 5 CR +1 V +1 01/25/15, 20:32

  12. Mathias Schreiber commented on patch set 5 V -1 CR -1 01/25/15, 20:40

    working on it
  13. Stefan Neufeind commented on patch set 5 01/25/15, 20:44

    Thanks for the changes so far. I was under the impression that neither AbstractTreeView or PageTreeView loaded for example "siteroot" into the $row, so I didn't have on my list that field of course also affects what is shown in the tree. Mathias mentioned that I overlooked some kind of "overlay" is finally done on the $row again. Taking all that into account I agree it might be a good idea to create a full list of fields to watch for changes (as you have done now).
  14. Mathias Schreiber uploaded patch set 6 01/25/15, 20:47

  15. Mathias Schreiber commented on patch set 6 CR +1 V +1 01/25/15, 20:47

    added starttime and endtime because those fields affect the overlay too
  16. Stefan Neufeind commented on patch set 6 CR -1 01/25/15, 20:55

    When working in a workspace, editing a content-element also needs to trigger a page-reload since that will create an overlay.
  17. Christian Kuhn commented on patch set 6 CR +2 V +2 01/25/15, 20:55

    Great. I think that's it for the moment.
  18. Christian Kuhn voted on patch set 6 CR 0 V 0 01/25/15, 20:56

  19. Stefan Neufeind uploaded patch set 7 01/25/15, 21:19

  20. Stefan Neufeind commented on patch set 7 01/25/15, 21:20

    Works fine now also if any CE is edited in a workspace. We refresh the PageTree there as well, since the page might now get a "modified in workspace"-indicator (which it didn't have before).
  21. Christian Kuhn voted on patch set 7 CR +1 V +1 01/25/15, 21:22

  22. Mathias Schreiber voted on patch set 7 CR +1 V +1 01/25/15, 21:24

  23. Stefan Neufeind commented on patch set 7 CR +2 V +2 01/25/15, 21:26

    Thanks, gentleman.
  24. Stefan Neufeind merged patch set 7 01/25/15, 21:26

  25. Stefan Neufeind commented on patch set 8 02/16/15, 16:40

    Pinged Ernesto again about possibly considering this for 6.2.