[Bug 37998] New: Tabs and backslashes in the data break item search display
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Bug ID: 37998 Summary: Tabs and backslashes in the data break item search display Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Searching Assignee: januszop@gmail.com Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org If the item data (e.g. callnumber) contains a tab or backslash OR the title part contains a backslash, the DataTable displaying the item search results stops throwing an error modal "Something went wrong when loading the table. 200: OK." and a JS console log: "DataTables warning: table id=results - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1". The solution would be to apply $To filter in itemsearch_item.json.inc not only for biblioitem.publishercode but to all elements (also in biblio-title.inc). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 171954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171954&action=edit Bug 37998: Tabs and backslashes in the data break item search display If the item data (e.g. callnumber) contains a tab or backslash OR the title part contains a backslash, the DataTable displaying the item search results stops throwing an error modal "Something went wrong when loading the table. 200: OK." and a JS console log: "DataTables warning: table id=results - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1". Test plan: ========== 1. Make an item search w/o any parameters. 2. From the first result page choose a record and modify the title (245 $a) to contain " \ " string. Repeat the item search. You should see a modal "Something went wrong when loading the table. 200: OK.". 3. Remove the " \ " from the title. Verify that the problem no longer occurs. 4. In the same record, insert the string " \ " or a tab (copied from a text editor) into item data (itemcallnumber, enumchron, barcode etc.). 5. Repeat the item search. You should see again a modal "Something went wrong when loading the table. 200: OK.". 6. Apply the patch; restart_all. 7. Repeat p. 2, 3, 4, and 5. Verify, that the problem is solved. Sponsored-by: Ignatianum University in Cracow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pmis@mnw.art.pl Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=37998 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171954|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 171955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171955&action=edit Bug 37998: Tabs and backslashes in the data break item search display If the item data (e.g. callnumber) contains a tab or backslash OR the title part contains a backslash, the DataTable displaying the item search results stops throwing an error modal "Something went wrong when loading the table. 200: OK." and a JS console log: "DataTables warning: table id=results - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1". Test plan: ========== 1. Make an item search w/o any parameters. 2. From the first result page choose a record and modify the title (245 $a) to contain " \ " string. Repeat the item search. You should see a modal "Something went wrong when loading the table. 200: OK.". 3. Remove the " \ " from the title. Verify that the problem no longer occurs. 4. In the same record, insert the string " \ " or a tab (copied from a text editor) into item data (itemcallnumber, enumchron, barcode etc.). 5. Repeat the item search. You should see again a modal "Something went wrong when loading the table. 200: OK.". 6. Apply the patch; restart_all. 7. Repeat p. 2, 3, 4, and 5. Verify, that the problem is solved. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Paul Derscheid <paul.derscheid@lmscloud.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=37998 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171955|0 |1 is obsolete| | --- Comment #3 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 174127 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174127&action=edit Bug 37998: Tabs and backslashes in the data break item search display If the item data (e.g. callnumber) contains a tab or backslash OR the title part contains a backslash, the DataTable displaying the item search results stops throwing an error modal "Something went wrong when loading the table. 200: OK." and a JS console log: "DataTables warning: table id=results - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1". Test plan: ========== 1. Make an item search w/o any parameters. 2. From the first result page choose a record and modify the title (245 $a) to contain " \ " string. Repeat the item search. You should see a modal "Something went wrong when loading the table. 200: OK.". 3. Remove the " \ " from the title. Verify that the problem no longer occurs. 4. In the same record, insert the string " \ " or a tab (copied from a text editor) into item data (itemcallnumber, enumchron, barcode etc.). 5. Repeat the item search. You should see again a modal "Something went wrong when loading the table. 200: OK.". 6. Apply the patch; restart_all. 7. Repeat p. 2, 3, 4, and 5. Verify, that the problem is solved. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 --- Comment #4 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 174149 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174149&action=edit Bug 37998: (QA follow-up) Remove excess whitespace in catalogue/itemsearch_item.json.inc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de QA Contact|testopia@bugs.koha-communit |paul.derscheid@lmscloud.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=37998 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.06 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to main |Pushed to stable --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- BAckported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=37998 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38631 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |johanna.raisa@koha-suomi.fi --- Comment #7 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- *** Bug 38631 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38631 | CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Great catch. I'm a bit concerned changing biblio-title.inc. This include is called in many places that are not JSON format. I see filter To removes starting+ending double quotes for example. Should we add a parameter to it : [% INCLUDE 'biblio-title.inc' json=1 %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc is the exact same file and has not been modified. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37998 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz Status|Pushed to oldstable |Needs documenting --- Comment #10 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org