Item1974: Section type "expandvariables" not working consistently for included templates
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component: foswiki.pm
Branches:
Ran across this while trying to implement a nested-template system. If the new topic template
INCLUDEs a second-level template within a section marked as "type=expandvariables" then I observed the following:
- The nested template is expanded out in the new topic, as you'd hope, but incorrectly
- Macros in the nested template are processed inconsistently / wrongly:
- NOP is translated to <nop> - I'd expect it to be removed, as is normal for topic creation
- param is displayed without translation (I just tried this to see if it was a workround)
- URLPARAM is expanded correctly
Simplified example:
(MainTemplate)
%STARTSECTION{type="expandvariables" param="TI"}%
%INCLUDE{"NestedTemplate" section="%URLPARAM{"subtemplate"}%"}%
%ENDSECTION{type="expandvariables"}%
(Nested Template)
%STARTSECTION{"Sub1"}%
%ACTI%NOP%ON{who="%URLPARAM{"assignee"}%"}% Action 1%ENDACTION%
%AC%param%ON{who="%URLPARAM{"assignee"}%"}% Action 2%ENDACTION%
%ENDSECTION{"Sub1"}%
Resulting new topic:
%ACTI<nop>ON{who="someone"}% Action 1%ENDACTION%
%AC%param%ON{who="someone"}% Action 2%ENDACTION%
ie (in my case) the actions don't get created in the new topic because the escaping is not working correctly.
--
AndrewMould - 26 Aug 2009
AFAICT it's working as per spec. The NOP in the nested template expands to <nop> which is what I'd expect. The parameters are handled correctly.
Given that this is nearly a year old, closing it no-action.
--
CrawfordCurrie - 25 Aug 2010