Bug 10704 - Search term highlighting doesn't work beyond the first results page
Summary: Search term highlighting doesn't work beyond the first results page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Galen Charlton
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-09 11:04 UTC by Martin Renvoize
Modified: 2015-06-04 23:23 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
fix for search term highlighting on record navigation (1.48 KB, patch)
2013-08-09 11:43 UTC, Jonathan Field
Details | Diff | Splinter Review
Hit highlighting not working on Previous & Next buttons (1.58 KB, patch)
2013-08-09 12:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10704: Hit highlighting not working on Previous & Next buttons (1.99 KB, patch)
2013-08-19 13:33 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2013-08-09 11:04:23 UTC
Reporting this bug on behalf of a customer.

When 'OpacHighlightedWords' is set to 'Highlight' in the system preferences only the first page of search results appear to be highlighted.  Any following results pages do not obey this preference.

To test;

1. Enable the above preference
2. Run a search that is known to get at least two pages wroth of results in the OPAC
3. Verify that on page one of the results, the terms you searched for are all highlighted in the results.
4. Verify that on page two (and beyond), the terms you searched for are not highlighted in the results.
Comment 1 Jonathan Field 2013-08-09 11:14:44 UTC
To be clear, it is the paging with the "Next" / "Previous" buttons which are affected. So :-

Enable 'OpacHighlightedWords'

1) Run a search with multiple results
2) Click on a title to get the full record display. Hit highlighting SHOULD work on this page.
3) Use either the "Next" or "Previous" buttons on this page (opac-detail).
4) Moving forward or back, the highlighting disappears. 

Moving from results to the first full record the URL contains the query_desc param  from the session data. This is dropped as you navigate back and forth, leaving only the biblionumber.
Comment 2 Jonathan Field 2013-08-09 11:43:49 UTC Comment hidden (obsolete)
Comment 3 Jonathan Field 2013-08-09 11:46:28 UTC
To test 

Enable 'OpacHighlightedWords'

1) Run a search with multiple results
2) Click on a title of one of the results to get the full record display. Hit highlighting SHOULD work on this page.
3) Use either the "Next" or "Previous" buttons on this page (opac-detail) to move to the next or previous record.
4) Moving forward or back, the highlighting should still be working on the page.
Comment 4 Kyle M Hall 2013-08-09 12:31:44 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2013-08-19 13:33:17 UTC
QA comment:

Simple patch. Fix the described issue.
I will c/p the test plan on my SO patch.

Marked as Passed QA.
Comment 6 Jonathan Druart 2013-08-19 13:33:35 UTC
Created attachment 20459 [details] [review]
Bug 10704: Hit highlighting not working on Previous & Next buttons

To test

Enable 'OpacHighlightedWords'

1) Run a search with multiple results
2) Click on a title of one of the results to get the full record
display. Hit highlighting SHOULD work on this page.
3) Use either the "Next" or "Previous" buttons on this page
(opac-detail) to move to the next or previous record.
4) Moving forward or back, the highlighting should still be working on
the page.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Galen Charlton 2013-08-19 14:16:02 UTC
Pushed to master.  Thanks, Jonathan!
Comment 8 Tomás Cohen Arazi 2013-09-13 14:37:36 UTC
This patch has been pushed to 3.12.x, will be in 3.12.5.

Thanks Jonathan!
Comment 9 Bernardo Gonzalez Kriegel 2013-09-15 01:42:14 UTC
Pushed to 3.10.x, will be in 3.10.11
Comment 10 Chris Hall 2013-11-22 21:57:25 UTC
Pushed to 3.8.x, will be in 3.8.20.