Skip to content

Collapse state is still not saved in user settings #7

@freshworkx

Description

@freshworkx

Collapsing some elements on a page and later revisiting the same page with the same user displays all elements in the expanded state. According to readme, I would expect the state of collapsed elements to be restored, same as #1.

I can confirm this behavior for TYPO3 11.5.30 and Collapse 1.0.0, the collapse state was not saved when I revisited the page.

After some troubleshooting, it looks like the field is not created in the user settings. You either do an addToList or removeFromList in PageModuleCollapse.js, but the field b13.collapse is never set.

I missed something like that in your PageModuleCollapse.js:

if (PersistentStorage.isset('B13.Collapse') === false) {
     PersistentStorage.set('B13.Collapse','');
}

On the first call, the field is created so that I can add or remove a value. This works for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions