Tags:
create new tag
view all tags

Question

I created a TWiki "application to handle our team contact information.

To output the results, I was using something like this (the line breaks are artificial here to make things easier to read)

%TABLE{headerbg="#CCCCFF" sort="on" initsort="1" 
dataalign="center" headeralign="center" }%
|*Name*|*Email*|*IM*|*IRC*||
%SEARCH{search="META:FIELD.*?PersonName.*?" topic="TeamContactPage.*" nosearch="on"  regex="on" noheader="on"  
format="| [[$topic][$formfield(PersonName)]] | 
$formfield(CorpID) | $formfield(CorpIM) | $formfield(CorpIRC) |" }%

The initsort worked as expected but, when I tried to sort by other columns, I was surprised. Sometimes column sorting appeared to work, sometimes it worked partially, sometimes not at all. Most unusual.

I "worked around" the problem by doing the initial sort in the search output:

%TABLE{headerbg="#CCCCFF" sort="on"  
dataalign="center" headeralign="center" }%
|*Name*|*Email*|*IM*|*IRC*|
%SEARCH{search="META:FIELD.*?PersonName.*?" topic="TeamContactPage.*" nosearch="on"  regex="on" noheader="on" 
order="formfield(PersonName)" 
format="| [[$topic][$formfield(PersonName)]] |  
$formfield(CorpID) | $formfield(CorpIM) | $formfield(CorpIRC) |" }%

Am I seeing a bug here? Or a known (but not well documented) inconsistency between TABLE and SEARCH?

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- VickiBrown - 03 Jun 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

A lot of fixes was done to TablePlugin in version 4.1.0.

You should upgrade to current 4.1.2. You problems may have been resolved.

Your problem description lacks the most important part. An example of a table that does not sort as it should.

-- KennethLavrsen - 04 Jun 2007

Kenneth - it's rather difficult to give you "an example", given the complexity of the test case. But given the code included above, the knowledgeable QA engineer should be able to build a working prototype :-) Just search on a set of pages wiith attached forms, wrapping the results in a sorted table.

-- VickiBrown - 13 Jun 2007

Change status to:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2007-06-13 - VickiBrown
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.