[BUGFIX] Move module state into reloadable part of DOM
The module menu is currently in a bad shape where different loose DOM elements and scripts are tangled together and do stuff. Previously, the module state was stored as a JSON-encoded string in the container of the actual module menu, which isn't refreshed when the module menu is reloaded via AJAX, leading to endless "loading" modules a freshly installed extension may add. Also, the JSON string gets parsed once and is then cached for faster access times. This patch accomplished multiple things: * the module state information is moved to the `nav` element of the module menu that's part of the reload process, always having the current state * an internal `flushModuleCache()` function is introduced to clear the cached, parsed state This is not an ideal solution but the best way the issue can be fixed in short-term. In long-term, the whole module structure and its handling need refactoring. Resolves: #100493 Releases: main, 12.4 Change-Id: I28342d7b207638e307c2ca7f4f50f2f4e6d27dbd Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78501 Tested-by:Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Stefan B�rk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Stefan B�rk <stefan@buerk.tech>
Showing
- Build/Sources/TypeScript/backend/module-menu.ts 4 additions, 3 deletionsBuild/Sources/TypeScript/backend/module-menu.ts
- Build/Sources/TypeScript/backend/module.ts 18 additions, 4 deletionsBuild/Sources/TypeScript/backend/module.ts
- typo3/sysext/backend/Classes/Controller/BackendController.php 4 additions, 1 deletion...3/sysext/backend/Classes/Controller/BackendController.php
- typo3/sysext/backend/Resources/Private/Partials/Backend/ModuleMenu.html 1 addition, 0 deletions...ackend/Resources/Private/Partials/Backend/ModuleMenu.html
- typo3/sysext/backend/Resources/Private/Templates/Backend/Main.html 2 additions, 2 deletions...ext/backend/Resources/Private/Templates/Backend/Main.html
- typo3/sysext/backend/Resources/Private/Templates/Backend/ModuleMenu.html 1 addition, 1 deletion...ckend/Resources/Private/Templates/Backend/ModuleMenu.html
- typo3/sysext/backend/Resources/Public/JavaScript/module-menu.js 1 addition, 1 deletion...sysext/backend/Resources/Public/JavaScript/module-menu.js
- typo3/sysext/backend/Resources/Public/JavaScript/module.js 1 addition, 1 deletiontypo3/sysext/backend/Resources/Public/JavaScript/module.js
Please register or sign in to comment