You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've dug through this, and the problem occurs in the following scenario: the first header of the page is enclosed in a hidden ifauth block.
I will see if I can get this properly fixed or if I need a workaround. In the meanwhile, to prevent page breakage, do not put the first header inside an ifauth block. You can use any other formatting as long as it's not a header.
Technical details:
The reason is that when the header is processed by the parser and lexer, it calls Doku_Handler.header. Any header opens a new section, thus setting Doku_Handler.status['section'] = true;. When the parser reaches the second header, the second header sees that a section is open and issues a section_close instruction. It looks like this:
[
["document_start",[]],
["plugin",["ifauthex",[1," admin"],1,"<ifauth admin>"]],
["header",["Hidden",3,16]],
/* This section is opened by the header above */
["section_open",[3]],
["p_open",[]],
["plugin",["ifauthex",[3,"private"],3,"private"]],
["cdata",[""]],
["p_close",[]],
["plugin",["ifauthex",[4,null],4,"<\/ifauth>"]],
/* Above: </ifauthex>, below: section_close issued by the following header. */
["section_close",[]],
["header",["Visible",3,51]],
["section_open",[3]],
["p_open",[]],
["cdata",["public"]],
["p_close",[]],
["section_close",[]],
["document_end",[]]
]
At render time, the html renderer writes a </div> tag in place of the section_close command, but there is no section that has been opened, because that command was hidden. Essentially it's because ifauth can break the page hierarchy.
Issue an extra section_open command when the first section was opened
within the hidden ifauth block, to anticipate the section_close command
that is necessarily going to be part of the document.
If the first headline on a page is hidden, the page layout breaks.
The following page:
displays like this for users not in restricted_group:
Release 2020-07-29 "Hogfather"
Default
dokuwiki
templateThe text was updated successfully, but these errors were encountered: