Skip to content

Commit

Permalink
[TASK] Migrate top.fsMod
Browse files Browse the repository at this point in the history
JavaScript top.fsMod is deprecated since TYPO3 11.4, this commit
replaces the old top.fsMod usage with the ModuleStateStorage,
now the ImmediateActionElement is used.

Ports: #3794
Resolves: #3489
  • Loading branch information
dkd-friedrich committed Sep 21, 2023
1 parent 68ae447 commit 542dd42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ protected function initializeView($view)
return;
}

$this->moduleTemplate->addJavaScriptCode(
'mainJsFunctions',
'
top.fsMod.recentIds["searchbackend"] = ' . $this->selectedPageUID . ';'
);
if ($this->selectedSite === null) {
return;
}
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Layouts/Backend/WithPageTree.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<f:render partial="Backend/NoSiteAvailable" arguments="{_all}"/>
</f:then>
<f:else>
<f:variable name="args" value="{0: 'searchbackend', 1: pageUID}" />
<typo3-immediate-action action="TYPO3.Backend.Storage.ModuleStateStorage.update" args="{args -> f:format.json() -> f:format.htmlspecialchars()}"></typo3-immediate-action>

<f:render partial="Backend/FlashMessages" />
<f:render section="Main"/>
Expand Down

0 comments on commit 542dd42

Please sign in to comment.