Bugzilla – Attachment 119373 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.53 KB, created by
Jonathan Druart
on 2021-04-09 12:21:36 UTC
(
hide
)
Description:
Bug 17979: Fix cataloguing search if ISBN 13 is passed
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-04-09 12:21:36 UTC
Size:
1.53 KB
patch
obsolete
>From c61958df9557e4a8dc5f39d304cb6e9f32681d1f 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 ne >ar '' 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" >--- > C4/Breeding.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 2a4ce3c2acc..fe764cfd890 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.20.1
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