[Koha-bugs] [Bug 34005] New: Toggling the search term highlighting is not always working in the bibliographic record details page

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 14 11:01:35 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34005

            Bug ID: 34005
           Summary: Toggling the search term highlighting is not always
                    working in the bibliographic record details page
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: OPAC
          Assignee: oleonard at myacpl.org
          Reporter: a.roussos at dataly.gr
        QA Contact: testopia at bugs.koha-community.org

To reproduce, make sure you have the OpacHighlightedWords System
Preference set to "Highlight", then perform a search in the OPAC.

NOTE: the number of keywords you search for is important, as this
bug only manifests when an odd number of search terms is used!
Therefore, try searching for a single keyword such as "history".

Now view the details page for one of the bibliographic records in
the results. On the right there should be an "Unhighlight" button
which, when clicked, will remove the search term highlighting and
change the button text to "Highlight". Clicking on "Highlight"
should re-enable the highlighting , but now the button text will
not toggle back to "Unhighlight" and further clicks on it have no
effect.

The relevant commit is 9cb89b46397 from v20.11.00, where the code
responsible for toggling the Unhighlight / Highlight button was
moved inside the for loop that cycles through each term in the
array of search terms. This explains why the toggling works only
when an even number of search terms is being used.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list