Item14322: 2+ searches on one page lead to wrong total number of results

Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release:
Applies To: Extension
Component: SEARCH, PatternSkin
Reported By: StefanH
Waiting For:
Last Change By: GeorgeClark
When having at least two searches on a single page, the total number of results shown before the results is wrong. Before the first search it seems the overall results of all searches are counted. Before the second and following searches, the string "Number of topics: ..." is completely missing. I'm gonna try this out here:

Searched: 1
Number of topics: 11

Searched: 1
Number of topics: 11

Searched: 1
Number of topics: 11

-- TestUser333 - 14 Feb 2017

This is related to Item10806. The Number of topics: presented on the first result is applied by javascript. It's a simple counter of the number of elements on the page. It's part of the pattern skin.

In pub/System/PatternSkin/pattern_src.js, it counts the number of <span> elements with .foswikiSearchResultCount, and places the results into #foswikiNumberOfResultsContainer. There is nothing that makes either of these elements unique per search, and it operates at the page level. So I'm really not sure how to go about fixing it. I'm leaning toward actually removing that particular counter as this is the 2nd situation where it's incorrect.

-- GeorgeClark - 14 Feb 2017

ItemTemplate edit

Summary 2+ searches on one page lead to wrong total number of results
ReportedBy StefanH
Codebase 2.1.3
SVN Range
AppliesTo Extension
Component SEARCH, PatternSkin
Priority Normal
CurrentState Confirmed
ReleasedIn n/a
Topic revision: r3 - 28 Mar 2018, 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