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

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release:
Applies To: Extension
Component: SEARCH, PatternSkin
Branches:
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
Item201,Item2010,Item2011,Item2012,Item2013,Item2014,Item2015,Item2016,Item2017,Item2018,Item2019
Number of topics: 11

Searched: 1
Item202,Item2020,Item2021,Item2022,Item2023,Item2024,Item2025,Item2026,Item2027,Item2028,Item2029
Number of topics: 11

Searched: 1
Item203,Item2030,Item2031,Item2032,Item2033,Item2034,Item2035,Item2036,Item2037,Item2038,Item2039
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
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
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