Review main Abandoned

75879[BUGFIX] Ensure modules initialized correctly after ext installation

Benjamin Kott CR 0 V 0 Hard +138 −141 updated 09/27/24, 07:41

Commit message

The module menu holds essential information for the routing
in the backend, but is currently not refreshed correctly
after installing an extension.

The responsibility keeping the information updated is moved
to the module menu directly. The connection to the scaffold
was removed, we are now able to ship new information with the
reload of the module menu.

To avoid empty files the interfaces for modules itself
were moved to the module menu.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 14

Review log 1319

  1. Benjamin Kott uploaded patch set 1 09/27/22, 12:38

  2. Andreas Kienast commented on patch set 1 09/27/22, 12:43

    module.ts:69

    This is a runtime cache that needs to be flushed after (de)installing an extension.
  3. core-ci voted on patch set 1 V +1 09/27/22, 12:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31589

  4. Andreas Kienast uploaded patch set 2 09/27/22, 12:54

  5. core-ci voted on patch set 2 V +1 09/27/22, 13:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31590

  6. Benjamin Kott uploaded patch set 3 09/27/22, 13:42

  7. Benjamin Kott commented on patch set 3 09/27/22, 13:42

    module.ts:69 Reply

    Ack
  8. core-ci voted on patch set 3 V +1 09/27/22, 13:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31593

  9. Benjamin Kott uploaded patch set 4 09/27/22, 14:06

  10. core-ci voted on patch set 4 V +1 09/27/22, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31595

  11. Benjamin Kott uploaded patch set 5 09/27/22, 14:15

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

  13. Benjamin Franzke commented on patch set 5 CR -1 09/27/22, 15:17

    Please keep the module state independent of the module menu. I don't want the router to import from module menu, as it is a component and we should not abuse it as central stateholder. btw, another thought: I am not sure whether we can keep the module menu refresh at all, as the importmap cannot be updated, so JavaScript imports for new extensions will fail. I think we have to refresh the backend and maybe provide a notification for the user to do so.
  14. Benjamin Kott commented on patch set 5 09/27/22, 15:41

    Reply

    We can also just reload the backend after loading an extension, but it should be nothing a USER need to take action after clicking the install button. I can agree on an automatic reload. Aside from that i don`t see any real reason to reload the module menu at all - we would also be able to get rid of the ajax calls necessary for that (not sure about refreshing sessions and getting new tokens). Anyways holder for the router- and module- configuration cannot be the scaffold. It needs to move somewhere else. For the current (not desired) implementation as is, the configuration belongs to the module menu, that`s why the code was moved. The router depends currently on the module menu, so even i agree that it`s not nice. But it belongs here until we moved it to a place where it served a more general purpose. If the router needs this information, it has to be moved somewhere to the router scope itself, because we are configuring the routing. The module menu should talk to the router where to navigate to.
  15. Benjamin Kott uploaded patch set 6 09/28/22, 12:00

  16. Benjamin Kott commented on patch set 6 CR -1 09/28/22, 12:00

    rebase, comments not resolved
  17. core-ci voted on patch set 6 V +1 09/28/22, 12:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31652

  18. Benjamin Franzke commented on patch set 6 09/30/22, 13:41

    Reply

    Fully agree, albeit module menu already uses the router though viewport.contentContainer, it does too much url-handling which I unfortunately didn't manage to migrate to be just `router.setAttribute('module', moduleToLoad)` (which could fetch the endpoint from the modules-array). I also agree that placing it on scaffold is not much better then using module-menu, but was required for third-level modules, see: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73914 I can live with whatever works best for you for now, I just want to assure, that in the long run, router does not depend on module-menu. A simple fix could be to provide the updating methods directly in @typo3/backend/module for now?
  19. Benjamin Kott abandoned the change 09/27/24, 07:41