You are here: Foswiki>Tasks Web>Item9445 (17 Mar 2011, GeorgeClark)Edit Attach

Item9445: $ntopics wrong in SEARCH header

pencil
Priority: Enhancement
Current State: Being Worked On
Released In: n/a
Target Release: major
Applies To: Engine
Component: SEARCH
Branches:
Reported By: MichaelDaum
Waiting For: Main.KennethLavrsen
Last Change By: GeorgeClark
SEARCH{header="$ntopics"} is always returning zero...should work like in footer

-- MichaelDaum - 09 Aug 2010

I looked at SEARCH recently so I have the code freshly in my head.

And this seems simple enough for me to grog.

-- KennethLavrsen - 09 Aug 2010

We need for 1.1 to at least fix the FAQ topic to not show 0

But we can live with this. I will try and fix but the way the code is structured I may defer the actual fix till 1.2.

If I have to refactor SEARCH for this then the risk of breaking something severe is high. The gain of being able to show $ntopics and $nhits (same problem) in header is relatively small. We have has the feature in T4.2 and Foswiki 1.0.X and noone reported it before.

If I can fix it with low risk for 1.1 I will.

If risk is high I fix the FAQ and lower the bug to normal.

-- KennethLavrsen - 09 Aug 2010

Fixing this is risky. I would have to almost rewrite the SEARCH code.

I do not dare and I do not feel anyone else should dare at this stage. A corrective action for 1.1 is to make sure the documentation does not suggest that $nhits and $ntopics work in the header

-- KennethLavrsen - 19 Aug 2010

The FAQ topic that used $ntopics wrong has been fixed.

I checked the documentation and it is correctly not listing $ntopics and $nhits for header. Only for format and footer. This is also how it works in (tm)wiki.

So no urgency to fix this.

So we wait till 1.2 before attempting this enhancement.

The code today process header before the search and changing the parsing would mean to store the header separately and then process the two tokens. That could have surprising effects for the many new paging modes we have which is why I will not do the refactoring for this for 1.1

Code refactoring in an area as complex as search will create new bugs - even when done by some of yu pros so please leave it until after 1.1. It is not really that important a feature. Noone asked for it before.

I am OK to take on this task but I will want to spend a lot of time testing.

-- KennethLavrsen - 22 Aug 2010

 

ItemTemplate edit

Summary $ntopics wrong in SEARCH header
ReportedBy MichaelDaum
Codebase 1.0.9, trunk
SVN Range
AppliesTo Engine
Component SEARCH
Priority Enhancement
CurrentState Being Worked On
WaitingFor KennethLavrsen
Checkins
TargetRelease major
ReleasedIn n/a
Topic revision: r5 - 17 Mar 2011, GeorgeClark
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