[pmwiki-users] Bug with SetTmplDisplay in preview handling?

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 7 08:09:49 CST 2005


On Mon, Mar 07, 2005 at 10:28:53AM +0000, Hans wrote:
> Neil Herber reported to me a strange bug using the latest gemini v7
> skin, and I am wondering if it is a bug not in the skin code but in
> pmwiki's handling of the preview format.

As I read it, it's not a bug (although it may indeed be confusing and 
thus need some modification).  Read on...

> [...]
> then editing the page will show no rightbar, which is intended using
> in gemini/altforms.php
>   global $action;
>   if ($action=='edit') {
>                         SetTmplDisplay('PageRightFmt', 0);
>                         SetTmplDisplay('PageHeaderFmt', 0);
>                         SetTmplDisplay('PageTitleFmt', 0);
>                         SetTmplDisplay('PageLeftFmt', 0);
>                         SetTmplDisplay('PageFootMenuFmt', 0); 
>         };
> BUT, and this is the bug, when clicking Preview, the rightbar appears
> as part of the edit window, which it should not, and did not before I
> changed the code to use SetTmplDisplay.
> So it seems that PageRightFmt is not suppressed through the above
> condition when preview is invoked for the page edit.

No, PageRightFmt is indeed being suppressed through the above.
However, previewing the page causes your (:showright:) markup to be
rendered, which has the effect of turning PageRightFmt back on again.
(The preview is rendered after the skin is loaded but before it's
displayed.)

So, it's not really a bug, although it could be a design misfeature.
I'm open for suggestions on changing this, although I don't have any
at the moment.

Pm



More information about the pmwiki-users mailing list