Tags:
create new tag
view all tags

Question

Just now, a previously working Search with Calc function seems to have mysteriously broken. This is how it looks:

%CALC{$SET(weekold, $TIMEADD($TIME(), -7, day))}% 
%SEARCH{"^NieuwsBericht" scope="all" regex="on" nosearch="on" nosummary="on" nototal="on" reverse="on" order="created"
format="| $percntCALC{$IF($TIME($date) < $GET(weekold), $percntNOP$percnt, $percntICON{led-green}$percnt | <b>[[$topic][$formfield(titel)]]</b> <br> <font size=\"-1\"><i>$createdate </i></font> - $summary(noheader, 150) [[$topic][meer]] - <i><font size=\"-1\"><nop>$createwikiname</i></font> |)}$percnt"}%

I've attached a picture of the problem: only on the first search hit the Calc function does not evaluate, on the other hots it seems to work fine, as before. I can't find the problem?

Environment

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RH9
Web server: Apache2
Perl version: 5.8.5
Client OS: XP
Web Browser: IE6
Categories: Search, Plugins

-- JosMaccabiani - 07 Jun 2006

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.

Did you paste the right SEARCH? I do not see a $IF() in there. The problem you experience with the single hit can be caused if an extra comma is introduced, which can confuse a spreadheet formula. If needed, $TRANSLATE() commas in a string to another character.

-- PeterThoeny - 07 Jun 2006

No, silly me, I pasted the wrong one. I corrected it just now. Found out a few things:

  • I tried the "translate", but then the IF is evaluated correctly but the TRANSLATE appears in the result.
  • It isn't the first hit to SEARCH, just in one case (topic) it fails. The topic doesn't look very different, was made in with the same application as the other ones (by me personally)
  • Maybe it has something to do with the " missing from the CALC? I don't know how to nest all these "s and 's

The raw content of the problematic topic NieuwsBericht29 is:

---+ Resultaten analyse versterkingsvarianten zwakke kustschakels

In de Nieuwsbrief Kustvisie 2050 een aantal paginas over de analyse van de versterkingsvarianten voor de zwakke schakels in Noord-Holland (w.o. Pettemer zeewering). Inclusief natuurwaarden en kosten/batenanalyse op aanleg en onderhoud.

De nieuwsbrief is voor de geïnteresseerde op te halen bij ondergetekende gedurende de komende week. Daarna wordt deze onhervindbaar gearchiveerd.
---
%TWISTY{id="extra_inhoud" link="Extra inhoud toevoegen" imgleft="%ICONURLPATH{toggleopen}%" mode="div" remember="on"}%

%<nop>COMMENT{type="nieuws_content"}%
%ENDTWISTY%

---++ Bron:
Nieuwsbrief Kustvisie 2050

---++ Reacties en discussie:
%<nop>COMMENT{type="threadmode"}%

---++ Voortvloeiende acties:
---
%<nop>COMMENT{type="action"}%

Thanks for helping out

  • problem.jpg:
    problem.jpg

-- JosMaccabiani - 07 Jun 2007

Could you please paste the raw HTML produced in the failing search, and possibly attach the topic in its completeness (incl. meta / form data)?

From the looks of this it should be reported as a bug in our bug tracker (Bugs:WebHome), possible a ")" escaped wrongly in the titel formfield or similar.

-- SteffenPoulsen - 24 Jun 2006

Things to check:

  • Look at the raw HTML. Is there a newline that breaks the TWiki table apart? Could possibly be in the titel field?
  • Check if there are commas or extra parenthesis in the failing row (although I do not think that this has an impact)

-- PeterThoeny - 01 Jul 2006

Feel free to re-open with more details.

-- SteffenPoulsen - 02 Jul 2006

Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg problem.jpg r1 manage 37.5 K 2006-06-07 - 20:25 UnknownUser  
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2006-07-02 - PeterThoeny
 
  • 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.