Skip to content

Commit

Permalink
[BUGFIX] Prevent currentSubScript re-assignment for secondary modules
Browse files Browse the repository at this point in the history
With the history-synchronization introduced in #93988,
window.currentSubScript has been unconditionally overwritten
after loading a new module in the content frame.
This causes an empty currentSubScript string to be stored
for secondary modules (modules not linked in the module menu),
and results in subsequent faults, when currentSubScript
is used to open a different page with the current module context.

Releases: master
Resolves: #94036
Related: #93988
Change-Id: Id957e72da5eb39437f35d19469dcdbd8a36c2b7e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68959
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
  • Loading branch information
bnf committed May 1, 2021
1 parent 67e8382 commit 8754728
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -408,7 +408,9 @@ class ModuleMenu {
const moduleData = getRecordFromName(moduleName);

// compatibility
top.currentSubScript = moduleData.link;
if (moduleData.link) {
top.currentSubScript = moduleData.link;
}
top.currentModuleLoaded = moduleName;

// Synchronisze navigation container if module is a standalone module (linked via ModuleMenu).
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8754728

Please sign in to comment.