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

Item5897: If COMMENT specifies target and target is missing, content disappears

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension CommentPlugin Normal No Action Required   n/a 4.1.1

Edit Form Data

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

Detail

If COMMENT specifies a target, e.g.
%COMMENT{type="logbook" templatetopic="VickiCommentTemplate"  target="%WEB%.%INCLUDINGTOPIC%#AnchorHere"}% 

and the target ( #AnchorHere) is not found

COMMENT will discard the results.

Instead of making the data disappear, COMMENT should default to whatever behaviour it would have expressed without a specified "target" parameter - e.g. put the content BEFORE or AFTER the comment box.

Sample Template

%TMPL:DEF{PROMPT:testpost}%
<table  valign="top">
<tr>
<td>
<textarea %DISABLED% rows="10" cols="80" name="testpost_summary" wrap="soft"></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="center">
   <input type="submit" value="Test Post" />
</td>
</tr>
</table>%TMPL:END%



%TMPL:DEF{OUTPUT:testpost}%

%POS:AFTER% 

%URLPARAM{"testpost_summary"}%

 -- %WIKIUSERNAME% %DATE%
---

%TMPL:END% 

-- TWiki:Main/VickiBrown - 07 Aug 2008

Hmmm, that's a tough call. Some would say it should generate an alert, otherwise it will appear that the comment plugin is stuffing comments where they aren't wanted. Imagine if the target is another topic, and you don't have write permission in the current topic (a typical pattern). The comment plugin would fail reporting that access was denied on the topic that isn't the target; very confusing!

Confirmed and reclassified as enhancement.

-- CrawfordCurrie - 08 Aug 2008

If the target is in a topic where you don't have authorization, I agree an alert is appropriate.

If the target is missing, perhaps COMMENT could act like INCLUDE and notice and put up a red warning that the target doesn't exist.

But in either case, causing everything you typed to disappear is inappropriate. COMMENT plugin is used for so much more than "commentary". In this case, we're creating Runbooks. When the engineer spends time typing in an instruction and it just disappears when he click submit, that's wrong.

I'm much more concerned by the disappearance of the content. The implementation details don't worry me much. (Preventing data loss is a bug fix, not an enhancement.)

-- TWiki:Main/VickiBrown - 08 Aug 2008

This is duplicate of Item6163.

-- TWiki:Main/PeterThoeny - 28 Feb 2010

ItemTemplate
Summary If COMMENT specifies target and target is missing, content disappears
ReportedBy TWiki:Main.VickiBrown
Codebase

SVN Range TWiki-5.0.0, Sun, 03 Aug 2008, build 17280
AppliesTo Extension
Component CommentPlugin
Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn 4.1.1
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2010-02-28 - PeterThoeny
 
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