Bugzilla – Attachment 132349 Details for
Bug 30386
Prevent search errors if deleted record still remains in search indexes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30386: Prevent search errors if deleted record still remains in search indexes
Bug-30386-Prevent-search-errors-if-deleted-record-.patch (text/plain), 1.26 KB, created by
Kyle M Hall
on 2022-03-28 15:10:35 UTC
(
hide
)
Description:
Bug 30386: Prevent search errors if deleted record still remains in search indexes
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2022-03-28 15:10:35 UTC
Size:
1.26 KB
patch
obsolete
>From 13479398e0d6698ae214b3d15134c028e7108552 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 28 Mar 2022 10:58:40 -0400 >Subject: [PATCH] Bug 30386: Prevent search errors if deleted record still > remains in search indexes > >If a bib is deleted, but for some reason doesn't get deleted from the search indexes, any search where that record is a result will produce the error: > >Can't call method "items" on an undefined value at /usr/share/koha/lib/C4/Search.pm line 2064. > >Test Plan: >1) Enable item-level_itypes >2) Create 3 records in Koha that share a word >3) Search for that word, note your 3+ results >4) Delete one of those recordst from the database using koha-mysql >5) Search for the word again >6) Note the error! >7) Apply this patch >8) Search for the word again >9) Note you get results! >--- > C4/Search.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 9dfca44df3..f5276805dc 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -2000,6 +2000,7 @@ sub searchResults { > } > > my $biblio_object = Koha::Biblios->find( $oldbiblio->{biblionumber} ); >+ next unless $biblio_object; > $oldbiblio->{biblio_object} = $biblio_object; > > my $can_place_holds = 1; >-- >2.32.0 (Apple Git-132)
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 30386
: 132349