Problem/Motivation
Autologout recently dropped js_cookie and was asked to look into if we could too. Lets see :)
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork quicktabs-3609965
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
joelpittetComment #5
joelpittetReferencing the localStorage fix issue
Comment #6
joelpittetCredited Marcos Hollanda (mabho) as that is where the
localStoragechanges came from in #2996076: Direct Link to a Quick TabComment #7
joelpittetBiggest difference here is that
localStoragelives longer than the cookies did... those were session cookies, they only lasted while the browser was open. Now the last clicked tab "survives" a restart, and old cookies just get ignored.The huge benefit is we get the same feature without the module dependency or cache-busting cookies! Nothing server-side ever read that cookie, it was just riding along on every request breaking Varnish/CDN caching for anonymous users.
Comment #8
smustgrave commentedThis looks great!
Comment #9
joelpittetSweet, let's get this in :) Merge 🚂
Comment #11
joelpittetComment #14
nick hope commentedThank you for replacing the js_cookie dependency. Quicktabs 4.3.1 is working fine for me in Druapl 11.4.5.
However, I encountered a problem when upgrading from Quicktabs 4.3.0 to 4.3.1.
An earlier Quicktabs update, quicktabs_update_103001(), explicitly installed the js_cookie module. Quicktabs 4.3.1 removes both the Drupal module dependency and the Composer dependency. Composer therefore removes the js_cookie code, but Drupal still has the module recorded as installed in core.extension.
The next database update then stops with the following error:
The following module is marked as installed in the core.extension configuration, but it is missing:
* js_cookie
I recovered by temporarily restoring the package, uninstalling the module through Drupal, and then removing the package again:
1. composer require drupal/js_cookie:2.0.1
2. drush pm:uninstall js_cookie
3. composer remove drupal/js_cookie
4. drush updatedb
This allows Drupal to perform the normal module-uninstall cleanup instead of manually removing entries from core.extension and system.schema.
Comment #15
joelpittetSecond person asked here #3616367: Updating 4.3.0 to 4.3.1 causes core.extension issue with js_cookie I think I over explained but maybe I am missing something?
Comment #16
joelpittetOr maybe we need to gut that update hook?
Comment #17
joelpittetUpdate hook was gutted actually https://git.drupalcode.org/project/quicktabs/-/blob/6dfa2dd80852e2b46ee4...
So check out the support issue, I can’t think of another reason off my head than transitive modules