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

Item6020: missing newline in VotePlugin results, vote is not counted

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension VotePlugin Normal Closed TWiki:Main.KeithHelfrich n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


When using the saveto feature of the TWiki:Plugins.VotePlugin: after a certain number of votes have been placed, eventually the vote result will fail to be placed on a new line. This means that the vote is not counted.

In the verbatim output below, only the usernames have been changed. Otherwise, we see the following behaviour from the VotePlugin

  1. User1 casts a number of votes without any problem (i.e. he changes his mind 7 times, all OK)
  2. User2 places one vote with no issues
  3. User2 changes his mind, and that vote fails to be placed on a new line

|BugTest|User1|1|What Happens=Option1,Let's Find Out=Option2|2008-08-24|
|BugTest|User1|1|What Happens=Option4,Let's Find Out=Option3|2008-08-24|
|BugTest|User1|1|What Happens=Option1,Let's Find Out=Option3|2008-08-24|
|BugTest|User1|1|What Happens=Option4,Let's Find Out=Option2|2008-08-24|
|BugTest|User1|1|What Happens=Option3,Let's Find Out=Option1|2008-08-24|
|BugTest|User1|1|What Happens=Option4,Let's Find Out=Option3|2008-08-24|
|BugTest|User1|1|What Happens=Option4,Let's Find Out=Option2|2008-08-24|
|BugTest|User2|1|What Happens=Option2,Let's Find Out=Option3|2008-08-24||BugTest|User2|1|What Happens=Option1,Let's Find Out=Option3|2008-08-24|

As a result, the most recent vote from User2 is not counted.

-- TWiki:Main/KeithHelfrich - 24 Sep 2008

ok, found it. the code was using readTopicText / saveTopicText that keep metadata in the text resulting in appending the results below the metadata at the end, messing the contents. As is said in the source: "This method is a lot less efficient and much more dangerous than =saveTopic="

Corrected to use TWiki::Func::readTopic & TWiki::Func::saveTopic

-- TWiki:Main.ColasNahaboo - 14 Oct 2008

Summary missing newline in VotePlugin results, vote is not counted
ReportedBy TWiki:Main.KeithHelfrich
Codebase 4.0.1, 4.2.0, 4.2.1, 4.2.2, 4.2.3
SVN Range TWiki-5.0.0, Tue, 23 Sep 2008, build 17539
AppliesTo Extension
Component VotePlugin
Priority Normal
CurrentState Closed
WaitingFor TWiki:Main.KeithHelfrich
Checkins TWikirev:17638
TargetRelease n/a

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2008-10-15 - ColasNahaboo
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