Bugzilla – Attachment 158284 Details for
Bug 35181
Can no longer edit sample records with advanced cataloguing editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35181: Don't pass undef to header
Bug-35181-Dont-pass-undef-to-header.patch (text/plain), 2.21 KB, created by
Phil Ringnalda
on 2023-11-02 20:26:25 UTC
(
hide
)
Description:
Bug 35181: Don't pass undef to header
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2023-11-02 20:26:25 UTC
Size:
2.21 KB
patch
obsolete
>From d9763bc5a1df6ff98f776e1c898d810e7f7684fd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 2 Nov 2023 10:56:30 +0000 >Subject: [PATCH] Bug 35181: Don't pass undef to header > >It seems passing an undef value causes the headers to be malformed. > >To test: >1 - Visit http://localhost:8081/cgi-bin/koha/svc/bib/303 >2 - Note 'Invalid-metadata' at top of page, as well as other headers >3 - Apply patch, restart all >4 - Visit http://localhost:8081/cgi-bin/koha/svc/bib/303 >5 - Page should now appear as xml >6 - Edit record 303, or any record with valid metadata in the advanced cataloging editor >7 - Confirm there is no error or alert >8 - Edit record 369 in the advanced cataloging editor >9 - Confirm there is an alert > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >--- > koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js | 2 +- > svc/bib | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js >index 3a73bc1131..5410f77563 100644 >--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js >+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js >@@ -108,7 +108,7 @@ define( [ '/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=defin > '/cgi-bin/koha/svc/bib/'+ id > ).done( function( metadata, status, xhr ) { > let encoding_issues = xhr.getResponseHeader('invalid-metadata'); >- if( encoding_issues ){ >+ if( encoding_issues > 0 ){ > humanMsg.displayAlert( _("Record had encoding issues, please switch to the basic editor to view details") ); > } > $.get( >diff --git a/svc/bib b/svc/bib >index 0667c0de4b..53e6fc753e 100755 >--- a/svc/bib >+++ b/svc/bib >@@ -69,7 +69,7 @@ sub fetch_bib { > my $biblio = Koha::Biblios->find( $biblionumber ); > my $record; > my $exception; >- my $invalid_metadata; >+ my $invalid_metadata = 0; > eval { $record = $biblio->metadata->record( { embed_items => scalar $query->param('items') } ) }; > if ($@) { > $exception = $@; >-- >2.40.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 35181
:
158241
|
158276
|
158284
|
158376