View | Details | Raw Unified | Return to bug 34014
Collapse All | Expand All

(-)a/C4/Biblio.pm (-1 / +10 lines)
Lines 371-377 sub ModBiblio { Link Here
371
371
372
    if ( C4::Context->preference("CataloguingLog") ) {
372
    if ( C4::Context->preference("CataloguingLog") ) {
373
        my $biblio = Koha::Biblios->find($biblionumber);
373
        my $biblio = Koha::Biblios->find($biblionumber);
374
        logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $biblio->metadata->record->as_formatted );
374
        my $record;
375
        my $decoding_error = "";
376
        eval { $record = $biblio->metadata->record };
377
        if( $@ ){
378
            my $exception = $@;
379
            $exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') );
380
            $decoding_error = "There was an error with this bibliographic record: " . $exception;
381
            $record = $biblio->metadata->record_strip_nonxml;
382
        }
383
        logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio $decoding_error BEFORE=>" . $record->as_formatted );
375
    }
384
    }
376
385
377
    if ( !$options->{disable_autolink} && C4::Context->preference('AutoLinkBiblios') ) {
386
    if ( !$options->{disable_autolink} && C4::Context->preference('AutoLinkBiblios') ) {
(-)a/cataloguing/addbiblio.pl (-1 / +7 lines)
Lines 577-583 my ( Link Here
577
);
577
);
578
578
579
if ( $biblio && !$breedingid ) {
579
if ( $biblio && !$breedingid ) {
580
    $record = $biblio->metadata->record;
580
    eval { $record = $biblio->metadata->record };
581
    if( $@ ){
582
        my $exception = $@;
583
        $exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') );
584
        $record = $biblio->metadata->record_strip_nonxml;
585
        $template->param( INVALID_METADATA => $exception );
586
    }
581
}
587
}
582
if ($breedingid) {
588
if ($breedingid) {
583
    ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ;
589
    ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-1 / +6 lines)
Lines 838-843 $(document).ready(function(){ Link Here
838
[% END #/ WRAPPER sub-header.inc %]
838
[% END #/ WRAPPER sub-header.inc %]
839
839
840
    <div class="main container-fluid">
840
    <div class="main container-fluid">
841
    [% IF ( INVALID_METADATA ) %]
842
        <div class="dialog alert">
843
            <p>This record had encoding issues, non-xml characters have been stripped in order to allow editing. Please be cautious when saving that some data may have been removed from the record.</br>Decoding error:</p>
844
            <span class="problem">[% INVALID_METADATA | html %]</span>
845
        </div>
846
    [% END %]
841
        <div class="row">
847
        <div class="row">
842
            <div class="col-md-10 col-md-offset-1">
848
            <div class="col-md-10 col-md-offset-1">
843
849
844
- 

Return to bug 34014