Bug 10704

Summary: Search term highlighting doesn't work beyond the first results page
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: SearchingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: trivial    
Priority: P5 - low CC: bgkriegel, chrish, jonathan.druart, jonathan.field, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6149
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: fix for search term highlighting on record navigation
Hit highlighting not working on Previous & Next buttons
Bug 10704: Hit highlighting not working on Previous & Next buttons

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.