Review main Merged

85288[BUGFIX] Navigate to selected page on switch of module

Ayke Halder CR +2 V +2 Easy +39 −7 updated 09/25/24, 14:37

Commit message

On switch of module this opens the already selected page. Before in the
module 'Web' no page was selected anymore under certain circumstances.

Adds test 'Switch modules back and forth keeps currently selected page'
which reproduces the issue and would fail without this change.

Module-state-storage stores the current record-id as 'identifier' and
the page-tree-path as 'selection'.
To open a page record in module 'web' we can not use 'selection':
`<PARENT_PARENT_ID>_<PARENT_ID>_<CURRENT_ID>`.
Instead we must use 'identifier': `<CURRENT_ID>`.

For the other modules 'identifier' and 'selection' are identical.

Review

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

Issues 1

Files 6

Review log 2229

Show 24 earlier messages
  1. Ayke Halder uploaded patch set 1 07/18/24, 20:07

  2. core-ci voted on patch set 1 V -1 07/18/24, 20:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61759

  3. Ayke Halder uploaded patch set 2 V -1 07/19/24, 13:26

  4. core-ci voted on patch set 2 V +1 07/19/24, 13:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61828

  1. Markus Klein commented on patch set 2 07/19/24, 17:37

    module-menu.ts:125

    we have the same condition twice now. I'd suggest moving this into a variable.
  2. Garvin Hicking commented on patch set 2 07/19/24, 17:42

    module-menu.ts:125 Reply

    would checking for section === 'web' here maybe catch other places too that might need adoption? Not familiar witn the code though...
  3. Ayke Halder uploaded patch set 3 V +1 07/22/24, 17:40

  4. Ayke Halder commented on patch set 3 07/22/24, 17:43

    This became a very small fix now. Please test.

    module-menu.ts:125 Reply

    Actually there is already a working `identifier`. Just using that one.
  5. core-ci voted on patch set 3 V +1 07/22/24, 17:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61935

  6. Francois Suter commented on patch set 3 CR +1 07/23/24, 09:45

    I just had a client being bothered by this today. This should (may I say "must"?) be backported to 12.
  7. Ayke Halder commented on patch set 3 07/23/24, 09:57

    Reply

    I can not reproduce this in TYPO3 v12. Please provide steps to reproduce: https://forge.typo3.org/issues/103784
  8. Georg Ringer commented on patch set 3 CR +1 V +1 07/23/24, 11:09

    there might be some issues on v13 as well but this is a different issue and is main only! THANKS a lot ayke!
  9. Francois Suter commented on patch set 3 07/24/24, 06:54

    Reply

    I dug some more and it is indeed a different issue.
  10. Ayke Halder uploaded patch set 4 CR +1 V +1 09/12/24, 14:04

  11. core-ci voted on patch set 4 V -1 09/12/24, 14:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65575

  12. Ayke Halder uploaded patch set 5 V -1 09/12/24, 14:28

  13. core-ci voted on patch set 5 V +1 09/12/24, 14:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65579

  14. Ayke Halder uploaded patch set 6 V +1 09/12/24, 15:01

  15. core-ci voted on patch set 6 V -1 09/12/24, 15:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65585

  16. Tymoteusz Motylewski commented on patch set 6 09/12/24, 19:09

    little hint on testing, please test it also with non admin user which has access to sub part of the page tree. another case is to test it with user having some mountpoints (possibly the same page is in few places in the pagetree)
  17. Ayke Halder commented on patch set 6 09/19/24, 19:38

    Reply

    This patch here only sets the new url on module-change by using the identifier instead of the selection. The mechanism for selecting the current node of the page-tree is not changed with this patch. For the reverse mechanism: open page by identifier from e.g. internal bookmark and then somehow select the current node in page-tree see: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85327/10
  18. Ayke Halder rebased onto patch set 7 V -1 09/19/24, 19:39

  19. core-ci voted on patch set 7 V +1 09/19/24, 19:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66245

  20. Rafael Kähm commented on patch set 7 CR +1 V +1 09/24/24, 15:23

  21. Oli Bartsch voted on patch set 7 CR +2 V +2 09/25/24, 07:02

  22. Oli Bartsch merged patch set 8 09/25/24, 07:02

  23. Benjamin Franzke wrote 09/25/24, 10:34

    Created a revert of this change as Ida7ac2e2ac2ab10ee7179c88c208c262389d533f
  24. Benjamin Franzke commented on patch set 8 09/25/24, 11:40

    that is not true, it is meant to always store the record-identifier (not the tree identifier). Fixed via > 86318: [TASK] Revert "[BUGFIX] Navigate to selected page on switch of module" | https://review.typo3.org/c/Packages/TYPO3.CMS/+/86318 > 86333: [BUGFIX] Pass correct page identifier into module state storage | https://review.typo3.org/c/Packages/TYPO3.CMS/+/86333
  25. Ayke Halder commented on patch set 8 09/25/24, 14:37

    Now as the page-tree still uses `selection` instead of `identifier` to load the current page in content-frame - this remains an unresolved issue here.

    Reply

    There was no need for any revert here. This not even introduced any new issue or did break anything. In page-tree-element there was a separate bug, which could have been fixed without reverting. The bugfix for that was already implemented in … * 85327: [BUGFIX] Select pages opened via bookmark and open-docs menu in page-tree | https://review.typo3.org/c/Packages/TYPO3.CMS/+/85327 … which is a direct follow-up patch to this one here.