Bugzilla – Attachment 119374 Details for
Bug 17979
Fatal error when searching from addbooks.pl due to ISBN flaw
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17979: Fix cataloguing search if ISBN 13 is passed
Bug-17979-Fix-cataloguing-search-if-ISBN-13-is-pas.patch (text/plain), 1.63 KB, created by
Owen Leonard
on 2021-04-09 12:31:48 UTC
(
hide
)
Description:
Bug 17979: Fix cataloguing search if ISBN 13 is passed
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-04-09 12:31:48 UTC
Size:
1.63 KB
patch
obsolete
>From 6013351e1f5f734b49f6e0b1ad59336e44c67431 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 9 Apr 2021 14:19:43 +0200 >Subject: [PATCH] Bug 17979: Fix cataloguing search if ISBN 13 is passed > >This patch fixes the following error: > >C4::Breeding::BreedingSearch(): DBI Exception: DBD::mysql::st execute >failed: You have an error in your SQL syntax; check the manual that >corresponds to your MariaDB server version for the right syntax to use >near '' at line 5 [for Statement "SELECT import_record_id, file_name, >isbn, title, author > FROM import_biblios > JOIN import_records USING (import_record_id) > JOIN import_batches USING (import_batch_id) > WHERE "] at /kohadevbox/koha/cataloguing/addbooks.pl line 126 > at /usr/share/perl5/DBIx/Class/Exception.pm line 77 > >It happens when our GetNormalizedISBN sub does not return an ISBN, the >SQL query generated by BreedingSearch is invalid > >Test plan: >Try a cataloguing search with "400638133393x" > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Tested with the suggested invalid ISBN as well as with some correct >ISBNS. No errors. >--- > C4/Breeding.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 2a4ce3c2ac..fe764cfd89 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -76,7 +76,7 @@ sub BreedingSearch { > my @results; > > # normalise ISBN like at import >- $isbn = C4::Koha::GetNormalizedISBN($isbn); >+ $isbn = C4::Koha::GetNormalizedISBN($isbn) || $isbn; > > $query = "SELECT import_record_id, file_name, isbn, title, author > FROM import_biblios >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17979
:
95673
|
119373
| 119374 |
119448