• 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.

Item5642: IF seems to be evaluated in the context of the INCLUDEd topic, not the BASETOPIC

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal New TWiki:Main.SvenDowideit n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

so if you have an information header that you INCLUDE into a topic, that tries to do an IF based on the form fields of the BASETOPIC, it fails - form.name appears to be the formname of the INCLUDEd topic.
%<nop>IF{"form.name~'*IsoManageMetaTemplate' AND fields[name='ApprovedRevision']" then="%REVINFO{'$rev'}%"}% 

I still need to confirm this is always true - at this point, I am INCLUDING from a view templat, but even then its problematic.

-- TWiki:Main/SvenDowideit - 21 May 2008

this leads to shenanigins like

%REVINFO{"$rev" topic="%FORMFIELD{"EditDocument" format="%BASEWEB%.%BASETOPIC%" topic="%BASEWEB%.%BASETOPIC%"}%%FORMFIELD{"ApprovedDocument" topic="%BASEWEB%.%BASETOPIC%" default="%BASEWEB%.%BASETOPIC%"}%"}%

-- TWiki:Main.SvenDowideit - 21 May 2008

An otherwise unqualified name is evaluated in the context of the meta-data object of the "current" topic. If the "topic" field in the meta-data were modified when a topic was included, I might have expected this. AFAIK, though, the stack for included topic names is local to the TWiki instance, so i don't know how this could happen.

Do you have a testcase?

-- TWiki:Main.CrawfordCurrie - 28 Jul 2008

ItemTemplate
Summary IF seems to be evaluated in the context of the INCLUDEd topic, not the BASETOPIC
ReportedBy TWiki:Main.SvenDowideit
Codebase 4.2.0
SVN Range TWiki-5.0.0, Sun, 04 May 2008, build 16770
AppliesTo Engine
Component

Priority Normal
CurrentState New
WaitingFor TWiki:Main.SvenDowideit
Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r2 - 2008-07-28 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback