• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Using a formfield in a parametric INCLUDE does not work. The % parser seems to get confused about tags with parameters in parameters of tags.

Example:

%INCLUDE{"RenderTopic" NAME="%TOPIC%" HEADLINE="%FORMFIELD{"Headline"}%"}%


The parser is fine, but %FORMFIELD renders the form field before it returns it. I can't see why it should do that, so I have removed it, and it all seems to work now. SVN 6073 CC


This isn't fixed completely: if a %FORMFIELD is a textarea with linefeeds in it then the %INCLUDE will not happen. Sorry, reopend this bug again.

TWiki:Main.MichaelDaum


It is fixed completely, as far as the spec of TWiki variables is concerned. No variable allows parameters that contain newlines, and the rules for expansion are quite clear; inner, then outer. If you change the way the parser works, it will be incompatible with Cairo and a lot more than this one example will break.

I agonised long and hard over this, and ended up with what seemed to be the solution most compatible with existing Cairo TWikiApplications. If you still don't agree, then we need to redefine TML, and you should raise a change request in Codev, as it is beyond the scope of a bug report.

CC


CC, should this item be reopended again according to your comments on irc?

TWiki:Main.MichaelDaum


No, because the current semantic is consistent with Cairo. if we change the semantic, we confuse people a hell of a lot more than if we don't. Every time I have tried to change these stupid semantics, I have had kickback from PeterThoeny, and I just can't be bothered having the argument again.

Note that this isn't the only stupid syntax/semantic. The way parameters to TWiki Variables are parsed stinks.

CC

ItemTemplate
Summary FORMFIELD not expanded in parametric INCLUDEs
ReportedBy MichaelDaum
Codebase

AppliesTo Engine
Priority Normal
CurrentState No Action Required
WaitingFor

Checkins 6073
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2005-08-19 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback