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

(-)a/catalogue/showelastic.pl (-3 / +3 lines)
Lines 31-38 use Try::Tiny; Link Here
31
31
32
# Koha modules used
32
# Koha modules used
33
use C4::Context;
33
use C4::Context;
34
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Auth;
35
use C4::Auth qw(get_template_and_user);
36
use C4::Biblio;
36
use C4::Biblio;
37
use C4::ImportBatch;
37
use C4::ImportBatch;
38
use C4::XSLT ;
38
use C4::XSLT ;
Lines 65-72 try { Link Here
65
    });
65
    });
66
}
66
}
67
catch{
67
catch{
68
    @es_fields = ("Error fetching record: see logs for details");
69
    warn $_;
68
    warn $_;
69
    print $input->redirect("/cgi-bin/koha/errors/404.pl");
70
};
70
};
71
71
72
for my $field (sort keys %{$es_record} ){
72
for my $field (sort keys %{$es_record} ){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +5 lines)
Lines 1745-1751 Note that permanent location is a code, and location may be an authval. Link Here
1745
            $("body").on("click",".previewElastic", function(e){
1745
            $("body").on("click",".previewElastic", function(e){
1746
                e.preventDefault();
1746
                e.preventDefault();
1747
                var pageElastic = $(this).attr("href");
1747
                var pageElastic = $(this).attr("href");
1748
                $("#elasticPreview .modal-body").load(pageElastic);
1748
                $("#elasticPreview .modal-body").load(pageElastic, function( response, status, xhr ) {
1749
                    if( status == 'error' ){
1750
                        $("#elasticPreview .modal-body").html('<h1>An error has occurred!</h1><h2><em>Error 404</em></h2><li>An internal link in the client is broken and the page does not exist</li></ul><h3>What\'s next?</h3><ul style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;"><li>Use top menu bar to navigate to another part of Koha.</li><li>To report a broken link or any other issue, please contact the Koha administrator. <a href="mailto:[% Koha.Preference('KohaAdminEmailAddress') | uri %]">Send email</a></li></ul>');
1751
                    }
1752
                });
1749
                $('#elasticPreview').modal({show:true});
1753
                $('#elasticPreview').modal({show:true});
1750
            });
1754
            });
1751
           [% END %]
1755
           [% END %]
1752
- 

Return to bug 18829