[dokuwiki] Re: useheading question

On 08/18/07 06:10, Chris Smith wrote:
Jason Keltz wrote:
Hi Chris,

I know we closed this issue back at the start of August, but I just wanted to let you know that I realized today that I don't think it's 100% resolved. If you are using the "use first heading" option, and the hierarchical breadcrumbs, and you come to a brand new DokuWiki site that doesn't yet have the data cached yet, and you visit a link other than "start", then you will only see the proper heading information for the link that you visit in the breadcrumb bar, while you will still see just IDs for the namespaces leading up to your page. The breadcrumbs function needs to load metadata for the whole path if it hasn't yet been loaded, and not just the metadata for the current ID.

This shouldn't be happening. If it is it deserves further investigation(*). When a request is made for a first headings, it can be made with a flag that says generate metadata if it doesn't exist. In general all calls should set that flag to true. The exception being the metadata renderer. The default value of that flag is false, that was done to avoid risking endless recursion two pages require a first heading from each other. Perhaps that was incorrect. The metadata renderer is really the only risk.
(*) I did a search on the DW codebase, there are several calls to p_get_first_heading() which don't use the flag. Several in the tpl_youarehere() function. Also my sidebar template (:)) and some plugins. Switching the default value should fix any problems associated with any of these and is, I think, the way to go.

Hi Chris,

I realized what the issue is... In my case, I'm starting a web site off with pre-loaded data in the pages directory. When I visit an internal page, the metadata for the other pages has not yet been rendered, so the breadcrumb bar doesn't show it. I still consider this a bug because I figure that the system should just get the metadata for all the headers between the start and the page that I'm on if the functioin requires it, but it isn't a huge big deal I guess....


DokuWiki mailing list - more info at

Other related posts: