- Merge request !7459Issue #2855618: Remove the Drupal.toolbar.collapsed cookie on user logout → (Open) created by apaderno
- last update
5 months ago 2,179 pass - Status changed to Needs review
5 months ago 9:07am 19 April 2024
For those concerned with cache and who don't want/can't modify their cache server's config (like varnish vcl).
In this case (no access to cache server config) we surely need to remove all cookies on logout and the one set by the toolbar core module isn't (Drupal.toolbar.collapsed). It is not a big deal for the user to collapse again the toolbar if not needed, so we can remove it safely on logout.
For the moment I use this simple javascript code (with jquery cookie plugin) :
if (Drupal.toolbar) {
$('a[href*="user\/logout"]').click(function() {
Cookies.remove('Drupal.toolbar.collapsed', {
path : Drupal.settings.basePath
});
});
This could be added to the toolbar.js Drupal.toolbar.init() function.
Needs review
7.0 ⚰️
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.