Bugzilla – Attachment 138089 Details for
Bug 29697
Replace GetMarcBiblio occurrences with $biblio->metadata->record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29697: tracklinks should not explode on invalid marc record
Bug-29697-tracklinks-should-not-explode-on-invalid.patch (text/plain), 1.67 KB, created by
Jonathan Druart
on 2022-07-25 13:10:14 UTC
(
hide
)
Description:
Bug 29697: tracklinks should not explode on invalid marc record
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-07-25 13:10:14 UTC
Size:
1.67 KB
patch
obsolete
>From cb391798b0600727eb183dbbec215ee0e0b58ef1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 25 Jul 2022 15:08:35 +0200 >Subject: [PATCH] Bug 29697: tracklinks should not explode on invalid marc > record > >Caught by t/db_dependent/www/regressions.t > > # Failed test '404 for itemnumber containing different URI' > # at t/db_dependent/www/regressions.t line 124. > # got: '500' > # expected: '404' > > # Failed test '302 for itemnumber with matching URI' > # at t/db_dependent/www/regressions.t line 126. > # got: '500' > # expected: '302' > > # Failed test '404 for itemnumber containing different URI' > # at t/db_dependent/www/regressions.t line 139. > # got: '500' > # expected: '404' > > # Failed test '302 for itemnumber with matching URI' > # at t/db_dependent/www/regressions.t line 141. > # got: '500' > # expected: '302' > # Looks like you failed 4 tests of 36. >--- > opac/tracklinks.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl >index ee74d8bd821..8f8e0ddb784 100755 >--- a/opac/tracklinks.pl >+++ b/opac/tracklinks.pl >@@ -61,7 +61,7 @@ if ($uri && ($biblionumber || $itemnumber) ) { > } > > my $biblio = Koha::Biblios->find($biblionumber); >- my $record = $biblio->metadata->record; >+ my $record = eval{ $biblio->metadata->record }; > my $marc_urls = $record ? C4::Biblio::GetMarcUrls($record, C4::Context->preference('marcflavour')) : []; > my $search_crit = { uri => { -like => "%$uri%" } }; > if( $itemnumber ) { # itemnumber is leading over biblionumber >-- >2.25.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 29697
:
129757
|
129758
|
129759
|
129760
|
129761
|
131868
|
131869
|
131870
|
131871
|
131872
|
131873
|
134066
|
134067
|
134068
|
134069
|
134070
|
134071
|
135574
|
135575
|
135576
|
135577
|
135578
|
135579
|
135580
|
135662
|
135663
|
135664
|
135665
|
135666
|
135667
|
135668
|
135669
|
135670
|
135671
|
135672
|
135673
|
135797
|
135798
|
135799
|
135800
|
135801
|
135802
|
135978
|
135979
|
135980
|
135981
|
135982
|
137835
|
137836
|
137837
|
137838
|
137839
|
137840
|
137894
|
137918
|
137919
|
137920
|
137921
|
137922
|
137923
|
137924
|
137948
|
138057
|
138076
|
138077
|
138078
|
138079
|
138080
|
138081
| 138089 |
138090
|
138804
|
139127
|
140007
|
140008