Commit 71fc29fc authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Do not access tce_db route directly

In case only one cache clear option is available
in the toolbar (no dropdown), clicking on the icon
previously led to a blank page, since the corresponding
JS event listener did not get called and the tce_db
route was called directly.

This is now fixed by using the correct class to notify
the event listener, which will call tce_db in an ajax request.

Resolves: #99671
Releases: main, 11.5
Change-Id: I0f6e9259fdf189b5fd021cdc03d9e5d57a290e01
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77533


Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 91fda281
......@@ -114,10 +114,10 @@ class ClearCacheToolbarItem implements ToolbarItemInterface, RequestAwareToolbar
}
$cacheAction = end($this->cacheActions);
$view->assignMultiple([
'link' => $cacheAction['href'],
'title' => $cacheAction['title'],
'iconIdentifier' => $cacheAction['iconIdentifier'],
]);
'link' => $cacheAction['href'],
'title' => $cacheAction['title'],
'iconIdentifier' => $cacheAction['iconIdentifier'],
]);
return $view->render('ToolbarItems/ClearCacheToolbarItemSingle');
}
......
......@@ -4,7 +4,7 @@
0: '@typo3/backend/toolbar/clear-cache-menu.js'
}"
/>
<a href="{link}" class="toolbar-cache-flush-action toolbar-item-link" title="{f:translate(key: title, default: title)}">
<a href="{link}" class="toolbar-item-link t3js-toolbar-cache-flush-action" title="{f:translate(key: title, default: title)}">
<f:render partial="ToolbarItems/ToolbarItem" arguments="{title: title, icon: '{core:icon(identifier: iconIdentifier, size: \'small\')}'}"/>
</a>
</html>
Supports Markdown
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