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.

Resolves: #3489
  • Loading branch information
dkd-friedrich committed Sep 21, 2023
1 parent df31241 commit 719d5cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,6 @@ protected function initializeView(ViewInterface $view): void
return;
}

// @todo: https://github.com/TYPO3-Solr/ext-solr/issues/3489
// Migrate following lines to TYPO3 12 conform way or remove them.
// $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 719d5cc

Please sign in to comment.