[Koha-bugs] [Bug 25749] New: "Unhighlight" action doesn't work - "Uncaught TypeError: $(...).removeHighlight is not a function"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Jun 14 18:33:23 CEST 2020


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

            Bug ID: 25749
           Summary: "Unhighlight" action doesn't work - "Uncaught
                    TypeError: $(...).removeHighlight is not a function"
 Change sponsored?: ---
           Product: Koha
           Version: 19.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: OPAC
          Assignee: oleonard at myacpl.org
          Reporter: ephetteplace at cca.edu
        QA Contact: testopia at bugs.koha-community.org

Created attachment 105861
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105861&action=edit
Screenshot just after Unhighlight button was clicked

Steps to recreate:

  - set OpacHighlightedWords to "Highlight"
  - Search any text that yields results, then view one of the result's bib
details pages
  - Search terms are highlighted
  - Select the "Unhighlight" action from the list on the right
  - Nothing happens
  - View your JavaScript console, see this error:
opac-detail.pl?biblionumber=XXXX&query_desc=books:1485 Uncaught TypeError:
$(...).removeHighlight is not a function
    at highlightOff (opac-detail.pl?biblionumber=7500&query_desc=books:1485)
    ...

What's odd about this is that the highlight jQuery plugin at
/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-3_19.1106000.js does
appear to be loaded; it's in the list of files under Chrome's "Network" tab. If
you copy-paste its contents into your JS console, then the highlight toggle
works as expected. My guess is this has something to do with the plugin not
being defined on the same version of jQuery that is being used in the
highlightOff() function.

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


More information about the Koha-bugs mailing list