samuelet / indexmenu

A dokuwiki plugin to show a customizable and sortable index for a namespace.
http://dokuwiki.org/plugin:indexmenu
GNU General Public License v2.0
47 stars 43 forks source link

Tree collapse after click on any link #298

Closed DrKlipper closed 9 months ago

DrKlipper commented 9 months ago

Hi ! Just updated to the latest version and now my tree has a very strange behavior. Whenever I click on a namespace or page link, the complete tree collapse. This is really annoying because you have always click through the tree to get to another page.

Example: grafik When I click on any link - lets say KiCAD - the tree collapses: grafik

The page (in this case KiCAD) will be opened. But the tree collapses.

This is my sidebar notation: {{indexmenu>.#1|js#bj_ubuntu.png noscroll skipfile=/sidebar|temp|dominik_schmidt|impressum/}}

Klap-in commented 9 months ago

Do you see any message in the Console of your browser? Does it make a difference if you resave the Configuration Manager (this expires all caches)?

DrKlipper commented 9 months ago

Thx for pointing to the Console. I saw some cookie errors which came from the non-existent HTTPS connection. After enabling HTTPS all is fine now. THX

DrKlipper commented 9 months ago

Fixed

m199841 commented 3 months ago

Hey, I seemingly have the same problem. I am not really sure what you did @DrKlipper - do you care to elaborate?

It seems that no cookies about the state of the tree is saved (even though it should be enabled). The exact same sidebar notation gives me the correct behavior (saves the state of the tree) when I open my DokuWiki from the localhost:8999 (I changed the port) - which means it is probably related to some security setting but changing the configuration file (securecookie ??) did not change this.

m199841 commented 3 months ago

Quick update on this. I had to remove the secure tag for setting cookies in the indexmenu.js file. I did not get any errors or issues in the console but since my connection to an (internal) DokuWiki is not secure I suspect it cannot set secure cookies when the flag is enabled. This is no issue when connecting to localhost because there one can always (?) set secure cookies.