[pmwiki-users] fox permissions problem after upgrade

adam overton a at plus1plus1plus.org
Thu Jan 17 04:03:40 CST 2013

yep yep yep yep yep yep!
now it works!

literally moments before you wrote i had discovered the EnableUndefinedTemplateVars update, and was disappointed to realize i might have to enable that, even though it seemed to solve the problem. never would have thought that fox would've been brilliant enough to work around this. BRAVO!

thank you so much, Hans, for helping me whittle down the issue as hand. i was this *_* close to going through my entire codebase for problems. eeesh. and i'm so glad to know now how to do better debugging with fox (in the past i was creating foxfilters to try and debug fox!)


On 17 Jan 2013, at 1:47 AM, Hans Bracker wrote:

> Hello Adam,
> I notice these parts of your Fox form:
> (:fox cbox ... target="{$$year}{$$month}{$$day}" ...:)
> ....
> (:cell width=5%:){$InputSelect_month}
> (:cell width=5%:){$InputSelect_day}
> (:cell width=5%:){$InputSelect_year}
> ....
> I do not notice any input fields named 'year', 'month', 'day'.
> I would normally expect those for use in the replacement variables
> {$$year}, {$$month}, {$$day}.
> But your HTML source shows input select tags with those names, so
> somehow you defined page variables  {$InputSelect_month} etc. to be
> rendered as these input tags. So that seems not the culprit.
> What puzzles me is that  target="{$$year}{$$month}{$$day}"
> is not rendered as
> <input type='hidden' name='target' value='{$$year}{$$month}{$$day}' />
> These variables are stripped out. Why? The fox markup does not do
> that as far as I know.
> Can you confirm this perhaps by creating a short Fox test form in a
> sandbox page, for instance:
> (:foxmessages:)
> (:fox frm template=#tmpl testtarget="{$$year}{$$month}{$$day}" :)
> Y:(:input text year:) M:(:input text month:) D:(:input text day:)
> (:input hidden foxfilter correctDate:)
> (:input submit post:)
> (:foxend frm:)
> (:if false:)
> [[#tmpl]]
> Test: {$$testtarget}
> [[#tmplend]]
> (:if:)
> This form does not create a page target, instead it posts to the same
> page. 'testtarget' is a hidden input similar to 'target' though, and
> one should see how the variables are used.
> Is '{$$year}{$$month}{$$day}' missing in the HTML source?
> Would be nice to know what causes stripping of the {$$variables} in
> the HTML rendering. Perhaps your upgrading has to do with this.
> There was a change in PmWiki regards undefined template variables,
> but I am not sure if that could have any bearing on your problem. See
> change in Version 2.2.14 and this:
> http://www.pmwiki.org/wiki/PmWiki/PagelistVariables#EnableUndefinedTemplateVars
> Ah, I see now!
> You could add to config.php
>  $EnableUndefinedTemplateVars = 1;
> We need to explicitely allow undefined variables of the type {$$var},
> if we use (:include ...:) markup to include Fox forms.
> To avoid this problem of having to set $EnableUndefinedTemplateVars
> (because undefined template variables may be desirable to hav eNOT
> shown) Fox got its very own markup to load a Fox form from another
> page: instead of (:include ... :) you can use this:
> (:foxform ... :) specifying the form page or page section.
> See http://softflow.co.uk/design/FoxDocumentation/FoxMarkup#foxform
> Best regards,
> Hans                         
> mailto:design at softflow.co.uk
> www.softflow.co.uk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20130117/a624b8cf/attachment.html>

More information about the pmwiki-users mailing list