Item4423: SpreadSheetPlugin calculations do not execute within CommentPlugin templates

Priority: Enhancement
Current State: Closed
Released In: 1.1.1
Target Release: minor
Applies To: Extension
Component: CommentPlugin
Reported By: TWiki:Main.KeithHelfrich
Waiting For:
Last Change By: KennethLavrsen
Marked as Urgent because both CommentPlugin and SpreadSheetPlugin are default plugins. See also: TWiki:Support.DynamicDoubleBracketLink

Steps to Reproduce

1. add the following to UserCommentsTemplate

Add Checklist Item

%TABLE{ valign="top" }%
| Add Checklist Item ||||||||
| *Status* <br/> <input %DISABLED% type="hidden" size="16" name="clitem_id" value="%SERVERTIME{$year$month$day$hour$min$sec}%" />%N% | *To Do* <br /> <input type="text" size="30" name="to_do" value="" /> | *Comment* <br /> <input type="text" size="50" name="comment" value="" /> |  <input %DISABLED% type="submit" value="%button|Add New Entry%" /> <br/> %CALC{"$IF($EXISTS(%WEB%.%TOPIC%ChecklistItemState), [[%TOPIC%ChecklistItemState][maintain states]], )"}% |

%TMPL:DEF{OUTPUT:checklist_table}%| %CLI{id="%URLPARAM{"clitem_id"}%"}% | %URLPARAM{"to_do"}% | %URLPARAM{"comment"}% |%POS:BEFORE%

2. use the comment template as follows


3. observe the problem

The following appears in the template (instead of the result of the "if exists" test):

%CALC{"$IF($EXISTS(CheckListT…tItemState), maintain states, )"}%

-- TWiki:Main/KeithHelfrich - 27 Jul 2007

What on earth is %CLI? AFAIK that's nothing to do with either plugin, nor the core.

-- TWiki:Main.CrawfordCurrie - 27 Jul 2007

Hi Crawford, a %CLI is from the TWiki:Plugins.ChecklistPlugin. Does it's existence in the template mean that the bug is invalid ?

-- TWiki:Main.KeithHelfrich - 03 Aug 2007

The question is if you also have the bug when you do not have the %CLI in the template.

It is a bit of a task having to install ChecklistPlugin to verify your problem.

-- TWiki:Main.KennethLavrsen - 27 Aug 2007

Bug confirmed.

See Item4423Test

Release blocker? Borderline I would say.

-- TWiki:Main.KennethLavrsen - 27 Aug 2007

We have been discussing back and forth a few times on which tags CommentPlugin should expand up front and which it should delay.

As I remember it we have sometimes ended up in it being a feature request to be able to state explicitely which tags are wished expanded at comment time and which are not.

Not a release blocker, more of a feature request / wish for functionality. Should be discussed in a Codev topic imho.

-- TWiki:Main.SteffenPoulsen - 27 Aug 2007

I agree it is not a release blocker.

Steffen do we have a Codev topic that already covers this?

And to anyone - is there a workaround that Keith can use?

-- TWiki:Main.KennethLavrsen - 27 Aug 2007

TWiki:Plugins.CommentPluginDev has a little discussion and a few workarounds (along the lines of pre-calculating needed values and putting them in a variable up front).

-- TWiki:Main.SteffenPoulsen - 27 Aug 2007

Pretty sure this is cured by eliminating commonSlagsHandler

-- CrawfordCurrie - 07 Sep 2010

ItemTemplate edit

Summary SpreadSheetPlugin calculations do not execute within CommentPlugin templates
ReportedBy TWiki:Main.KeithHelfrich
SVN Range TWiki-4.1.2, Thu, 19 Jul 2007, build 14438
AppliesTo Extension
Component CommentPlugin
Priority Enhancement
CurrentState Closed
Checkins distro:8ceb61054e04
TargetRelease minor
ReleasedIn 1.1.1
Topic revision: r11 - 04 Oct 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy