Collapsible Category

Collapsible Category 2.5.0

No permission to download
Sadly ... no. Not here.
As @Cyberkef mentioned in his post I just noticed that this problem has not been fixed. Closed categories have re-opened again.
Inside Out Reaction GIF by Disney Pixar
 
Several of my users are reporting the same "closed -> open categories" issue after some while.

While diving in the DevTools I see a mention of 24 hours in the MemoryStorage:

View attachment 242280
Also on an older thread there is mention of this: https://xenforo.com/community/threa...toragedata-is-not-adhered.170474/post-1387962 I looks like it should be possible to override this default setting with an extra data-xf-* attribute?

Maybe this can help shine some light on this problem :D

We now use cookies and don't rely on local storage anymore.

The last update should clear all confusion and set this issue to rest.
 
My apologies in advance (I hope I don't come over as an annoying person :D), but just moving the toggle-data from Local Storage -> Cookie did not fix the 24 hour unfolding (only the location where it is stored that it needs to be collapsed after 24 hour) 🙈

unknown.png


(it still stores the 86400 value with the collapsed node in the cookie)
 
Last edited:
We now use cookies and don't rely on local storage anymore.

The last update should clear all confusion and set this issue to rest.
Not really, the collapsed categories are opening again on their own. They should stay closed until opened by the user not by some arbitrary hour.
 
I was just looking into it last night (to learn more about the code) and I found an optional options.storageExpiry (that defaults to 86400) in structure.js regarding the ToggleStorage.

So maybe it's just as simple as adding data-storage-expiry="31536000" to store it for a full year? 🤷‍♂️ (I did not test it out myself yet since you just made your reply :D)

edit

That seems to do the trick locally 🎉🥳
 
Last edited:
are you using private browsing mode, or have it set to clear cookies on exit/start?

that will loose the info on what was collapsed.
 
It was a fresh install just today. So I am sure it is the newest release. I can see data-storage-expiry="31556926" So not sure what is going.
Must be some other issue going on because I've been running the latest since January and have not seen any problems.
 
Works fine if you don't log out and close the browser. But if you log out and sign back in the categories are back open. Very weird.
 
Top Bottom