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

Subpage isn't showing into the menu if has same namespace name than parent namespace #240

Closed eduardomozart closed 3 years ago

eduardomozart commented 3 years ago

If I create a page into the :ad:gpo:user:adm:desktop:desktop, the IndexMenu shows only :ad:gpo:user:adm:desktop into the sidebar, the subnamespace below desktop (that's also called desktop) isn't shown.

2021-04-12 09_14_21-teste

But if I rename the last desktop for something else (e.g :ad:gpo:user:adm:desktop:somethingelse), it's shown normally.

2021-04-12 09_15_02-teste

It doesn't seem to be related to the template used because it happens even with DokuWiki default template and third party templates.

Some debug info:

DokuWiki version: Release 2020-07-29 "Hogfather" Template: Vector

Code that I'm using into :wiki:sidebar namespace:

{{indexmenu>..:#1|js#doku2 navbar nsort nocookie}}

Please let me know if anymore information are needed.

samuelet commented 3 years ago

This is the right behaviour , when useheading and hide_headpage are enabled .Could you check them? : https://www.dokuwiki.org/plugin:indexmenu#namespaces_title_and_link_headpages

eduardomozart commented 3 years ago

But it shouldn't be a default behavior, because sub pages isn't shown and for a user that do not know it can happen may think that it's sub page doesnt exist. The plugin should be able to list sub pages that has the same namespace name than its parent. E.g. :ad:gpo:user:adm:desktop:desktop should be shown into IndexMenu tree, but only :ad:gpo:user:adm:desktop is shown. When I said that I renamed :ad:gpo:user:adm:desktop:desktop for something else, it was its namespace name to "somethingelse", not its heading. I keeped the heading from the page the same as the parent namespace and it showed twice normally. Its only when the namespace name is the same than the parent namespace that it doesn't show. When I disable the "hide_headpage" feature, it shows the namespace as expected, but the same should happen even if this feature is enabled. The "use_heading" option is enabled.

samuelet commented 3 years ago

Could you post screenshots of the missing namespace and of the working tree with renamed ns? Is the Aclcache disabled?

eduardomozart commented 3 years ago

Hello @samuelet, The aclcache option is set to "Groups", as I use groups to set ACLs to external users that access the Wiki. I updated the first comment to include screenshots of the issue.

Klap-in commented 3 years ago

What is set for the setting 'plugin»indexmenu»headpage' in your wiki?

Could you try to disable :inside:? That option tells that an page inside a namespace with the same name as the namespace should be seen as a headpage.

eduardomozart commented 3 years ago

The setting 'plugin»indexmenu»headpage' is set to :start:, :same: and :inside:. I disabled the :inside: checkbox and it shows the child page as expected. Thank you!