[Bug 29578] New: Search term highlighting breaks with titles containing characters with Greek diacritics
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Bug ID: 29578 Summary: Search term highlighting breaks with titles containing characters with Greek diacritics Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: a.roussos@dataly.gr QA Contact: testopia@bugs.koha-community.org The commits from Bug 5844 and Bug 20501 fixed the problem of DOM content disappearing from the results of OPAC/Staff Client searches under certain conditions (e.g. when the search terms were "magaz mag" or "the the"). However, there is still a case where the jQuery term highlighter can break, and in the process actually make the "Highlight"/"Unhighlight" button disappear altogether! To reproduce, catalogue two books using the titles below, one of which includes a word ("τοῖς") [1] containing Greek diacritics: Title #1: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων Title #2: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913) Then, perform a catalog search for "επιτομή των" (without the quotes). You should get what is depicted in the attached screenshots. Notice how 1) the "Highlight"/"Unhighlight" button has disappeared, and 2) not all search terms are highlighted (e.g. "των" in the 2nd result) If using Firefox, in the Browser Console the following error will be logged: Uncaught DOMException: Index or size is negative or greater than the allowed amount The offending file is koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-3.js, line 26: 26 var endbit = middlebit.splitText(pat.length); Upgrading the plugin from its current version (v3) to the latest version available [1] from the developer (v5) fixes the problem. Please note that the changes to this script from commit 2e4b574074 should also be incorporated. [1] https://en.wiktionary.org/wiki/%CF%84%CE%BF%E1%BF%96%CF%82 [2] https://johannburkard.de/blog/programming/javascript/highlight-javascript-te... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |a.roussos@dataly.gr Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #1 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 128034 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128034&action=edit search term highlighting broken in the OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #2 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 128035 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128035&action=edit search term highlighting broken in the Staff Client -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #3 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 128053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128053&action=edit Bug 29578: Upgrade the jQuery highlighter plugin Under certain conditions, the jQuery term highlighter can break and in the process actually make the "Highlight"/"Unhighlight" button disappear altogether. This affects catalog searches in both the OPAC and the Staff Client. This patch fixes that by upgrading the plugin to its latest version. Test plan: 0) Catalogue two books using the titles below, one of which includes a word ("τοῖς") containing Greek diacritics: Book #1 title: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων Book #2 title: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913) Then, perform a catalog search for "επιτομή των" (without the quotes). In the results page, notice that: a) the "Highlight"/"Unhighlight" button has disappeared, and b) not all search terms are highlighted (e.g. "των" in the 2nd book) 1) Apply this patch. 2) Repeat the same search (remember to press CTRL-F5 to refresh JS code). This time the "Highlight"/"Unhighlight" button is displayed normally, and all instances of your search terms are highlighted in the results. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 128055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128055&action=edit Bug 29578 - Screenshots from testing 2021-11028 I attempted to test this (using koha-testing-docker on master) but I didn't get the same results. My observations: 1. Before the patch is applied: in the OPAC and staff interface I am not seeing the Unhighlight and Highlight button disappearing as reported. These appear fine for me (using Firefox and Google Chrome on Ubuntu 18.04). The highlighting on the search results page also looks okay to me - see the screenshots in the attachment (note: I just changed the titles for existing records). 2. OPAC details page (clicking through from the search results page): . Before the patch is applied I do see the issue with words not being highlighted on the detail page. . After the patch is applied this fixes this, and for "normal" searches highlighting continues to work as expected. 3. Staff interface details page (clicking through from the search results page): both before and after the patch is applied search words are not highlighted on the details page for a record (not sure if this is the expected behavour or not - "normal" words are not highlighted either). Not related to this bug, but in the OPAC I do not see the browse results block (Browse results, Previous, Back to results, Next) on the right hand side on the detail page when using Google Chrome - it displays fine using Firefox. See the attachment. I have logged bug 29582 for this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #5 from Andreas Roussos <a.roussos@dataly.gr> --- Hi David! Thank you very much for your interest in this bug report, and the detailed response with your findings. My screenshots were taken using Firefox 94.0.2 on Windows 10 64-bit. Today I fired up an Ubuntu 18.04.6 LTS Desktop in a Virtual Machine, and using the live session user (i.e. no O/S install was performed) I was actually able to reproduce the problem outlined in this Bug's Decription on both Firefox 92.0 (the version shipped with the O/S) and the latest Google Chrome 96.0.4664.45 (official build, downloaded from [1]). I attach two new screnshots from the OPAC, illustrating the problem with the disappearing "Highlight"/"Unhighlight" button. [1] https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #6 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 128067 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128067&action=edit OPAC highlight button disappearing on Ubuntu Firefox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #7 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 128068 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128068&action=edit OPAC highlight button disappearing on Ubuntu Google Chrome -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128053|0 |1 is obsolete| | --- Comment #8 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- Created attachment 128150 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128150&action=edit Bug 29578: Upgrade the jQuery highlighter plugin Under certain conditions, the jQuery term highlighter can break and in the process actually make the "Highlight"/"Unhighlight" button disappear altogether. This affects catalog searches in both the OPAC and the Staff Client. This patch fixes that by upgrading the plugin to its latest version. Test plan: 0) Catalogue two books using the titles below, one of which includes a word ("τοῖς") containing Greek diacritics: Book #1 title: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων Book #2 title: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913) Then, perform a catalog search for "επιτομή των" (without the quotes). In the results page, notice that: a) the "Highlight"/"Unhighlight" button has disappeared, and b) not all search terms are highlighted (e.g. "των" in the 2nd book) 1) Apply this patch. 2) Repeat the same search (remember to press CTRL-F5 to refresh JS code). This time the "Highlight"/"Unhighlight" button is displayed normally, and all instances of your search terms are highlighted in the results. Signed-off-by: ThibaudGLT <thibaud.guillot@biblibre.com> Work on Firefox 94.0-Ubuntu 20.04LTS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #9 from David Nind <david@davidnind.com> --- Hi Andreas and Thibaud.
From your screenshots I can see that what is described is happening, but I still can't reproduce it.
I was testing on the latest master with Zebra koha-testing-docker. Are there any specific system preferences that need to be set, or any other configuration that needs to be done? David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #10 from Andreas Roussos <a.roussos@dataly.gr> --- (In reply to David Nind from comment #9)
Hi Andreas and Thibaud.
From your screenshots I can see that what is described is happening, but I still can't reproduce it.
I was testing on the latest master with Zebra koha-testing-docker.
Are there any specific system preferences that need to be set, or any other configuration that needs to be done?
David Hi David,
Thank you for your continued interest in this bug report! ;-) The Koha instance I used was brand new, without any specific system preferences applied to it (I actually double-checked this today via the Log viewer under Tools which showed no SysPref modifications at all). It's a generic MARC21 instance w/ Zebra, nothing special about it AFAICT. This is a long shot, but could it be that -- somehow -- the patch is already applied to your docker instance when you launch it, therefore you are always seeing the correct behaviour w.r.t. the highlighter? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org Status|Needs Signoff |Failed QA --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 1) Replicating the problem I am sorry to say, but I can't replicate the error exactly as described: The buttons don't disappear. But I see a small improvement with the patch: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων First it only highlighted the last 2 letters, but not the τ. With the patch applied and after some nudging to load the new libary των is highlighted completely. I tested in latest Ubuntu with Firefox and Chrome. 2) Updating plugin I think if we update the plugin, we will also want to change the version coded in the file name, so we force browsers to load the updated file: koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-3.js Also, your change is only for the OPAC, we probably need to update in the staff interface separately. Adding Owen for some advice here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff Patch complexity|Small patch |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 131153 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131153&action=edit Bug 29048: Fix link to linked records from authority search results in OPAC Without this patch the constructed search link would give wrong results with Elasticsearch. If you searched for records linked to authority id 3 it would also turn up all other records linked to an authority where the id started with 3... This just copies the more specific link using an,phr used in the staff interface and the OPAC detail page to make things consistent To test: - Turn on Elasticsearch - Search for authorities in the OPAC - Locate a authority with a low ID in your result list - Note the number of linked records - Click on the link - It will give you more results than it said before - Verify results don't match your search - Apply patch - Try again - now it should all match up -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry, bug number confusion on my part... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131153|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thibaud.guillot@biblibre.co | |m Status|Failed QA |Needs Signoff --- Comment #14 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- (In reply to David Nind from comment #9)
Hi Andreas and Thibaud.
From your screenshots I can see that what is described is happening, but I still can't reproduce it.
I was testing on the latest master with Zebra koha-testing-docker.
Are there any specific system preferences that need to be set, or any other configuration that needs to be done?
David
Hello David, Did you try this patch recently ? Last attachment pushed can fix this behavior so I will change this bug to Needs SO to try to move forward :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Amaury GAU <amaury.gau@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |amaury.gau@bulac.fr --- Comment #15 from Amaury GAU <amaury.gau@bulac.fr> --- Hi, I can't reproduce the Test Plan. Everything seems correct before and after applying the patch, in both the Staff interface and the OPAC. This might have been corrected throughout the updates. Probably needs some checkup. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #16 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- (In reply to Amaury GAU from comment #15)
Hi,
I can't reproduce the Test Plan. Everything seems correct before and after applying the patch, in both the Staff interface and the OPAC.
This might have been corrected throughout the updates. Probably needs some checkup.
Hi Amaury, I tried to reproduce it again, there are some behavior changes on the master, the button to highlight or not appears now but the terms are not properly highlighted (as in the test plan: "b) not all search terms are highlighted (e.g. "των" in the 2nd book)") and after applying this patch it seems to be fixed. However, for versions 21.11 and earlier, the behavior is as explained in this bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #17 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- (In reply to Amaury GAU from comment #15)
Hi,
I can't reproduce the Test Plan. Everything seems correct before and after applying the patch, in both the Staff interface and the OPAC.
This might have been corrected throughout the updates. Probably needs some checkup.
I forgot to answer you about sysprefs or others that must be activated.. On master now there is a syspref to activate Highlight on search terms, so it must be set on 'Highlight' of course => see "StaffHighlightedWords". Thanks :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Hi, We need to rename jquery.highlight-3.js => jquery.highlight-5.js no ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #19 from Andreas Roussos <a.roussos@dataly.gr> --- Thank you all for your valuable feedback! Please see my answers below: (In reply to Katrin Fischer from comment #11)
I think if we update the plugin, we will also want to change the version coded in the file name, so we force browsers to load the updated file: Done. I will attach an updated patch that renames the plugin.
Also, your change is only for the OPAC, we probably need to update in the staff interface separately. Actually, my first patch took care of both. See here: https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128053&action=diff
(In reply to Amaury GAU from comment #15)
I can't reproduce the Test Plan. Everything seems correct before and after applying the patch, in both the Staff interface and the OPAC. Indeed, when I try the test plan on the current master (commit 9863c18cc8) I get what Katrin observed in Comment 11. However, if I set up a UNIMARC test instance on master I still get the disappearing "Highlight" button but now only in the OPAC! Also, in both the Staff interface and the OPAC the following message is displayed in the JavaScript Console: Uncaught DOMException: Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length.
This might have been corrected throughout the updates. Probably needs some checkup. I will upload two more screenshots to show the highlighting behaviour in a UNIMARC instance, and will adjust the test plan.
(In reply to Fridolin Somers from comment #18)
We need to rename jquery.highlight-3.js => jquery.highlight-5.js no ? Yes, we do. My updated patch will take care of this.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #20 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 147088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147088&action=edit OPAC highlight button disappearing (UNIMARC instance on current master) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #21 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 147089 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147089&action=edit Staff interface term highlighting partially broken (UNIMARC instance on current master) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128150|0 |1 is obsolete| | --- Comment #22 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 147090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147090&action=edit Bug 29578: Upgrade the jQuery highlighter plugin Under certain conditions, the jQuery term highlighter can break and in the process make the "Highlight" / "Unhighlight" button disappear altogether. This affects catalog searches in both the OPAC and the Staff Client, with UNIMARC-based instances affected the most as the "Highlight" / "Unhighlight" button disappears if you perform a specific OPAC search (see Test plan below). This patch fixes that by upgrading the highlighter plugin to its latest version for both the OPAC and the Staff interface. Then, the changes from commit 2e4b574074 (Bug 5844) are applied to the plugin code. Also, Koha uses "term" instead of "highlight" as the class name for the <span> highlighting elements, so the plugin code is modified for that aspect, too. Finally, the plugin file is renamed to reflect the version change (v3 -> v5) and all references to the old filename in the Template files are updated. Test plan: 0) In a UNIMARC instance, catalogue two books using the titles given below (Title subfield = 200$a): Book 1: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων Book 2: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913) 1) OpacHighlightedWords and StaffHighlightedWords should both be set to "Highlight". 2) Search the OPAC for "επιτομή των" (without the quotes). In the results page, notice that: a) You get an Uncaught DOMException error in the web browswer's JavaScript Console (press F12): "Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length." b) the "Highlight" / "Unhighlight" button vanishes c) some search terms matches are not highlighted (for example "των" in the 2nd Book) 3) Repeat the same search in the Staff interface. In the results page, notice that: a) You get an Uncaught DOMException error in the web browswer's JavaScript Console (press F12): "Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length." b) Even though some terms are highlighted, the button still says "Highlight" c) some search terms matches are not highlighted (for example "των" in the 2nd Book) 4) Apply this patch. 5) Repeat the searches (you may have to press CTRL-F5 to reload the JavaScript code). This time the "Highlight" / "Unhighlight" button is displayed in the OPAC, and all your search terms should be highlighted in yellow. Toggling the highlight should cause no problems, and there shouldn't be any errors logged in your browser's Console. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Stephanie Etallaz <stephanie.etallaz@univ-cotedazur.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |stephanie.etallaz@univ-cote | |dazur.fr --- Comment #23 from Stephanie Etallaz <stephanie.etallaz@univ-cotedazur.fr> --- CONFLICT (rename/rename): Rename "koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-3.js"->"koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery.highlight-3.js" in branch "HEAD" rename "koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-3.js"->"koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-5.js" in "Bug 29578: Upgrade the jQuery highlighter plugin" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147090|0 |1 is obsolete| | --- Comment #24 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 154146 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154146&action=edit Bug 29578: Upgrade the jQuery highlighter plugin Under certain conditions, the jQuery term highlighter can break and in the process make the "Highlight" / "Unhighlight" button disappear altogether. This affects catalog searches in both the OPAC and the Staff Client, with UNIMARC-based instances affected the most as the "Highlight" / "Unhighlight" button disappears if you perform a specific OPAC search (see Test plan below). This patch fixes that by upgrading the highlighter plugin to its latest version for both the OPAC and the Staff interface. Then, the changes from commit 2e4b574074 (Bug 5844) are applied to the plugin code. Also, Koha uses "term" instead of "highlight" as the class name for the <span> highlighting elements, so the plugin code is modified for that aspect, too. Finally, the plugin file is renamed to reflect the version change (v3 -> v5) and all references to the old filename in the Template files are updated. Test plan: 0) In a UNIMARC instance, catalogue two books using the titles given below (Title subfield = 200$a): Book 1: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων Book 2: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913) 1) OpacHighlightedWords and StaffHighlightedWords should both be set to "Highlight". 2) Search the OPAC for "επιτομή των" (without the quotes). In the results page, notice that: a) You get an Uncaught DOMException error in the web browswer's JavaScript Console (press F12): "Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length." b) the "Highlight" / "Unhighlight" button vanishes c) some search terms matches are not highlighted (for example "των" in the 2nd Book) 3) Repeat the same search in the Staff interface. In the results page, notice that: a) You get an Uncaught DOMException error in the web browswer's JavaScript Console (press F12): "Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length." b) Even though some terms are highlighted, the button still says "Highlight" c) some search terms matches are not highlighted (for example "των" in the 2nd Book) 4) Apply this patch. 5) Repeat the searches (you may have to press CTRL-F5 to reload the JavaScript code). This time the "Highlight" / "Unhighlight" button is displayed in the OPAC, and all your search terms should be highlighted in yellow. Toggling the highlight should cause no problems, and there shouldn't be any errors logged in your browser's Console. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #25 from Andreas Roussos <a.roussos@dataly.gr> --- (In reply to Stephanie Etallaz from comment #23)
CONFLICT (rename/rename): Rename "koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-3.js"-
"koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery.highlight-3.js" in branch "HEAD" rename "koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-3.js"- "koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.highlight-5.js" in "Bug 29578: Upgrade the jQuery highlighter plugin" Thank you for your interest in this bug report, Stephanie.
The patch has been rebased against the current master, please try again ;-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154146|0 |1 is obsolete| | --- Comment #26 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 154494 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154494&action=edit Bug 29578: Upgrade the jQuery highlighter plugin Under certain conditions, the jQuery term highlighter can break and in the process make the "Highlight" / "Unhighlight" button disappear altogether. This affects catalog searches in both the OPAC and the Staff Client, with UNIMARC-based instances affected the most as the "Highlight" / "Unhighlight" button disappears if you perform a specific OPAC search (see Test plan below). This patch fixes that by upgrading the highlighter plugin to its latest version for both the OPAC and the Staff interface. Then, the changes from commit 2e4b574074 (Bug 5844) are applied to the plugin code. Also, Koha uses "term" instead of "highlight" as the class name for the <span> highlighting elements, so the plugin code is modified for that aspect, too. Finally, the plugin file is renamed to reflect the version change (v3 -> v5) and all references to the old filename in the Template files are updated. Test plan: 0) In a UNIMARC instance, catalogue two books using the titles given below (Title subfield = 200$a): Book 1: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων Book 2: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913) 1) OpacHighlightedWords and StaffHighlightedWords should both be set to "Highlight". 2) Search the OPAC for "επιτομή των" (without the quotes). In the results page, notice that: a) You get an Uncaught DOMException error in the web browswer's JavaScript Console (press F12): "Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length." b) the "Highlight" / "Unhighlight" button vanishes c) some search terms matches are not highlighted (for example "των" in the 2nd Book) 3) Repeat the same search in the Staff interface. In the results page, notice that: a) You get an Uncaught DOMException error in the web browswer's JavaScript Console (press F12): "Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length." b) Even though some terms are highlighted, the button still says "Highlight" c) some search terms matches are not highlighted (for example "των" in the 2nd Book) 4) Apply this patch. 5) Repeat the searches (you may have to press CTRL-F5 to reload the JavaScript code). This time the "Highlight" / "Unhighlight" button is displayed in the OPAC, and all your search terms should be highlighted in yellow. Toggling the highlight should cause no problems, and there shouldn't be any errors logged in your browser's Console. Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #27 from David Nind <david@davidnind.com> --- Hi Christian. Since you've signed off the bug, you should change the status in Bugzilla to 'Signed Off'. That way you will get the credit in the dashboard! (https://dashboard.koha-community.org/) David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Christian Nelson <christian.nelson@uwasa.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christian.nelson@uwasa.fi Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #28 from Christian Nelson <christian.nelson@uwasa.fi> --- Thank you David. Now the status should be updated. Training sign-off in Perl KohaCon in Helsinki :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #29 from David Nind <david@davidnind.com> --- That's great! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154494|0 |1 is obsolete| | --- Comment #30 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 154807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154807&action=edit Bug 29578: Upgrade the jQuery highlighter plugin Under certain conditions, the jQuery term highlighter can break and in the process make the "Highlight" / "Unhighlight" button disappear altogether. This affects catalog searches in both the OPAC and the Staff Client, with UNIMARC-based instances affected the most as the "Highlight" / "Unhighlight" button disappears if you perform a specific OPAC search (see Test plan below). This patch fixes that by upgrading the highlighter plugin to its latest version for both the OPAC and the Staff interface. Then, the changes from commit 2e4b574074 (Bug 5844) are applied to the plugin code. Also, Koha uses "term" instead of "highlight" as the class name for the <span> highlighting elements, so the plugin code is modified for that aspect, too. Finally, the plugin file is renamed to reflect the version change (v3 -> v5) and all references to the old filename in the Template files are updated. Test plan: 0) In a UNIMARC instance, catalogue two books using the titles given below (Title subfield = 200$a): Book 1: Συλλογής των εν επιτομή τοῖς πάλαι γεωγραφηθέντων Book 2: Επιτομή της ιστορίας των Βαλκανικών Πολέμων (1912-1913) 1) OpacHighlightedWords and StaffHighlightedWords should both be set to "Highlight". 2) Search the OPAC for "επιτομή των" (without the quotes). In the results page, notice that: a) You get an Uncaught DOMException error in the web browswer's JavaScript Console (press F12): "Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length." b) the "Highlight" / "Unhighlight" button vanishes c) some search terms matches are not highlighted (for example "των" in the 2nd Book) 3) Repeat the same search in the Staff interface. In the results page, notice that: a) You get an Uncaught DOMException error in the web browswer's JavaScript Console (press F12): "Failed to execute 'splitText' on 'Text': The offset 3 is larger than the Text node's length." b) Even though some terms are highlighted, the button still says "Highlight" c) some search terms matches are not highlighted (for example "των" in the 2nd Book) 4) Apply this patch. 5) Repeat the searches (you may have to press CTRL-F5 to reload the JavaScript code). This time the "Highlight" / "Unhighlight" button is displayed in the OPAC, and all your search terms should be highlighted in yellow. Toggling the highlight should cause no problems, and there shouldn't be any errors logged in your browser's Console. Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #31 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00 |23.11.00,23.05.04 released in| | Status|Pushed to master |Pushed to stable --- Comment #32 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.04 |23.11.00,23.05.04,22.11.10 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 --- Comment #33 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29578 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes an issue with release notes| |the term highlighter which | |is used during catalog | |searches in both the OPAC | |and the Staff interface. | |Under certain conditions | |(searching for titles | |containing characters with | |Greek diacritics), the | |jQuery term highlighter | |would break and in the | |process make the | |"Highlight" / "Unhighlight" | |button disappear | |altogether. UNIMARC | |instances were affected the | |most by this. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org