Skip to content
Commit fd265dd2 authored by Andreas Fernandez's avatar Andreas Fernandez
Browse files

[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/+/80366


Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent b75212c3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment