@@ -, +, @@ translatability - Apply patch - Trigger 404 error for staff and for OPAC by calling a page that does not exist - Try to trigger other error pages and/or carefully review code changes in the *.pl files - Review koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt and koha-tmpl/intranet-tmpl/prog/en/modules/errorpage.tt --- errors/400.pl | 7 +- errors/401.pl | 7 +- errors/402.pl | 7 +- errors/403.pl | 7 +- errors/404.pl | 7 +- errors/500.pl | 7 +- .../intranet-tmpl/prog/en/modules/errors/400.tt | 29 ------- .../intranet-tmpl/prog/en/modules/errors/401.tt | 30 -------- .../intranet-tmpl/prog/en/modules/errors/402.tt | 29 ------- .../intranet-tmpl/prog/en/modules/errors/403.tt | 29 ------- .../intranet-tmpl/prog/en/modules/errors/405.tt | 29 ------- .../intranet-tmpl/prog/en/modules/errors/500.tt | 29 ------- .../en/modules/errors/{404.tt => errorpage.tt} | 16 ++-- .../opac-tmpl/bootstrap/en/modules/errors/404.tt | 54 ------------- .../bootstrap/en/modules/errors/errorpage.tt | 81 ++++++++++++++++++++ opac/errors/400.pl | 7 +- opac/errors/401.pl | 7 +- opac/errors/402.pl | 7 +- opac/errors/403.pl | 7 +- opac/errors/404.pl | 7 +- opac/errors/500.pl | 7 +- 21 files changed, 149 insertions(+), 261 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/errors/400.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/errors/401.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/errors/402.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/errors/403.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/errors/405.tt delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/errors/500.tt rename koha-tmpl/intranet-tmpl/prog/en/modules/errors/{404.tt => errorpage.tt} (77%) delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/404.tt create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt --- a/errors/400.pl +++ a/errors/400.pl @@ -27,12 +27,15 @@ my $query = CGI->new; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => 'errors/400.tt', + template_name => 'errors/errorpage.tt', query => $query, type => 'intranet', authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 400, +); output_with_http_headers $query, $cookie, $template->output, 'html', '400 Bad Request'; --- a/errors/401.pl +++ a/errors/401.pl @@ -26,12 +26,15 @@ my $query = CGI->new; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => 'errors/401.tt', + template_name => 'errors/errorpage.tt', query => $query, type => 'intranet', authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 401, +); output_with_http_headers $query, $cookie, $template->output, 'html', '401 Unauthorized'; --- a/errors/402.pl +++ a/errors/402.pl @@ -27,12 +27,15 @@ my $query = CGI->new; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => 'errors/402.tt', + template_name => 'errors/errorpage.tt', query => $query, type => 'intranet', authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 402, +); output_with_http_headers $query, $cookie, $template->output, 'html', '402 Payment Required'; --- a/errors/403.pl +++ a/errors/403.pl @@ -27,12 +27,15 @@ my $query = CGI->new; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => 'errors/403.tt', + template_name => 'errors/errorpage.tt', query => $query, type => 'intranet', authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 403, +); output_with_http_headers $query, $cookie, $template->output, 'html', '403 Forbidden'; --- a/errors/404.pl +++ a/errors/404.pl @@ -27,12 +27,15 @@ my $query = CGI->new; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => 'errors/404.tt', + template_name => 'errors/errorpage.tt', query => $query, type => 'intranet', authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 404, +); output_with_http_headers $query, $cookie, $template->output, 'html', '404 Not Found'; --- a/errors/500.pl +++ a/errors/500.pl @@ -27,12 +27,15 @@ my $query = CGI->new; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => 'errors/500.tt', + template_name => 'errors/errorpage.tt', query => $query, type => 'intranet', authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 500, +); output_with_http_headers $query, $cookie, $template->output, 'html', '500 Internal Server Error'; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/400.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/400.tt @@ -1,29 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Koha › Error -[% INCLUDE 'doc-head-close.inc' %] - - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - - -
- -
-
-
-

An error has occurred!

-

Error 400

-
    -
  • This error means that the link was broken and that the page doesn't exist
  • -
  • To report this error, you can email the Koha administrator.
  • -
  • Use top menu bar to navigate to another part of Koha.
  • -
-
- -
-
- -[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/401.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/401.tt @@ -1,30 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Koha › Error 401 -[% INCLUDE 'doc-head-close.inc' %] - - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - - -
- -
-
-
-

An error has occurred!

-

Error 401

-
    -
  • This error means that you aren't authorized to view this page.
  • -
  • Please log in and try again. -
  • To report this error, you can email the Koha administrator.
  • -
  • Use top menu bar to navigate to another part of Koha.
  • -
-
- -
-
- -[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/402.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/402.tt @@ -1,29 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Koha › Error 402 -[% INCLUDE 'doc-head-close.inc' %] - - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - - -
- -
-
-
-

An error has occurred!

-

Error 402

-
    -
  • This error means that the link was broken and that the page doesn't exist
  • -
  • To report this error, you can email the Koha administrator.
  • -
  • Use top menu bar to navigate to another part of Koha.
  • -
-
- -
-
- -[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/403.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/403.tt @@ -1,29 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Koha › Error 403 -[% INCLUDE 'doc-head-close.inc' %] - - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - - -
- -
-
-
-

An error has occurred!

-

Error 403

-
    -
  • This error means that you are forbidden to view this page.
  • -
  • To report this error, you can email the Koha administrator.
  • -
  • Use top menu bar to navigate to another part of Koha.
  • -
-
- -
-
- -[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/405.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/405.tt @@ -1,29 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Koha › Error 405 -[% INCLUDE 'doc-head-close.inc' %] - - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - - -
- -
-
-
-

An error has occurred!

-

Error 405

-
    -
  • This error means that the link was broken and that the page doesn't exist
  • -
  • To report this error, you can email the Koha administrator.
  • -
  • Use top menu bar to navigate to another part of Koha.
  • -
-
- -
-
- -[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/500.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/500.tt @@ -1,29 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -Koha › Error 500 -[% INCLUDE 'doc-head-close.inc' %] - - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - - -
- -
-
-
-

An error has occurred!

-

Error 500

-
    -
  • In Koha this typically means that the Koha team is working on new features
  • -
  • Wait while system maintenance is being done or email the Koha administrator.
  • -
  • Use top menu bar to navigate to another part of Koha.
  • -
-
- -
-
- -[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/404.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/404.tt @@ -1,21 +1,21 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Error 404 +Koha › Error [% errno %] [% INCLUDE 'doc-head-close.inc' %] - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
- +
-
-
+
+

An error has occurred!

-

Error 404

+

Error [% errno %]

This message may have been caused by any of the following reasons:

  • You made use of an external link to an item that is no longer available
  • @@ -26,7 +26,7 @@

    What's next?

    • Use top menu bar to navigate to another part of Koha.
    • -
    • To report a broken link or any other issue, please send an email to the Koha Administrator
    • +
    • To report a broken link or any other issue, please contact the Koha Administrator. Send email
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/404.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/404.tt @@ -1,54 +0,0 @@ -[% INCLUDE 'doc-head-open.inc' %] -[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › An error has occurred -[% INCLUDE 'doc-head-close.inc' %] -[% BLOCK cssinclude %][% END %] - - -[% INCLUDE 'masthead.inc' %] - -
- - -
-
- [% IF ( OpacNav || OpacNavBottom ) %] -
- -
-
- [% ELSE %] -
- [% END %] -
-

Sorry, the requested page is not available

-

Error 404

-

This message can have following reasons

-
    -
  • You made use of an external link to a catalog item that is no longer available
  • -
  • You followed an outdated link e.g. from a search engine or a bookmark
  • -
  • You tried to access a page that needs authentification
  • -
  • An internal link in our catalog home page is broken and the page does not exist
  • -
-

What's next?

-
    -
  • You can search our catalog using the search form at the top of this page
  • -
  • You can navigate to the catalog main page
  • -
-

Report broken links

- -
-
-
-
-
- -[% INCLUDE 'opac-bottom.inc' %] -[% BLOCK jsinclude %] -[% END %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt @@ -0,0 +1,81 @@ +NCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › An error has occurred +[% INCLUDE 'doc-head-close.inc' %] +[% BLOCK cssinclude %][% END %] + + +[% INCLUDE 'masthead.inc' %] + +
+ + +
+
+ [% IF ( OpacNav || OpacNavBottom ) %] +
+ +
+
+ [% ELSE %] +
+ [% END %] +
+

Sorry, the requested page is not available

+

Error [% errno %]

+

This message can have following reason(s)

+
    + [% IF ( errno == 400 ) %] +
  • Koha is pointed an invalid link.
  • + [% END %] + + [% IF ( errno == 401 ) %] +
  • You are trying to access a link that you're not authorized to see.
  • +
  • Try logging in to the catalog.
  • + [% END %] + + [% IF ( errno == 402 ) %] +
  • Koha is pointed an invalid link.
  • + [% END %] + + [% IF ( errno == 403 ) %] +
  • You are forbidden for some reason to see this page.
  • + [% END %] + + [% IF ( errno == 404 ) %] +
  • You made use of an external link to a catalog item that is no longer available.
  • +
  • You followed an outdated link e.g. from a search engine or a bookmark.
  • +
  • You tried to access a page that needs authentification.
  • +
  • An internal link in our catalog home page is broken and the page does not exist.
  • + [% END %] + [% IF ( errno == 500 ) %] +
  • An error occurred while try to process your request.
  • + [% END %] +
+

What's next?

+
    + [% IF ( errno == 401 ) %] +
  • Try logging in to the catalog.
  • + [% END %] +
  • You can use the menu and links at the top of the page
  • +
  • You can search our catalog using the search form at the top of this page.
  • +
  • Return to the catalog home page.
  • +
+

Report issues and broken links

+
    +
  • To report this error, please contact the Koha Administrator. + Send email.
  • +
+
+
+
+
+
+ +[% INCLUDE 'opac-bottom.inc' %] +[% BLOCK jsinclude %] +[% END %] --- a/opac/errors/400.pl +++ a/opac/errors/400.pl @@ -28,12 +28,15 @@ my $query = new CGI; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "errors/400.tt", + template_name => "errors/errorpage.tt", query => $query, type => "opac", authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 400, +); output_with_http_headers $query, $cookie, $template->output, 'html', '400 Bad Request'; --- a/opac/errors/401.pl +++ a/opac/errors/401.pl @@ -28,12 +28,15 @@ my $query = new CGI; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "errors/401.tt", + template_name => "errors/errorpage.tt", query => $query, type => "opac", authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 401, +); output_with_http_headers $query, $cookie, $template->output, 'html', '401 Unauthorized'; --- a/opac/errors/402.pl +++ a/opac/errors/402.pl @@ -28,12 +28,15 @@ my $query = new CGI; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "errors/402.tt", + template_name => "errors/errorpage.tt", query => $query, type => "opac", authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 402, +); output_with_http_headers $query, $cookie, $template->output, 'html', '402 Payment Required'; --- a/opac/errors/403.pl +++ a/opac/errors/403.pl @@ -28,12 +28,15 @@ my $query = new CGI; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "errors/403.tt", + template_name => "errors/errorpage.tt", query => $query, type => "opac", authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 403, +); output_with_http_headers $query, $cookie, $template->output, 'html', '403 Forbidden'; --- a/opac/errors/404.pl +++ a/opac/errors/404.pl @@ -28,12 +28,15 @@ my $query = new CGI; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "errors/404.tt", + template_name => "errors/errorpage.tt", query => $query, type => "opac", authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 404, +); output_html_with_http_headers $query, $cookie, $template->output, '404 Not Found'; --- a/opac/errors/500.pl +++ a/opac/errors/500.pl @@ -28,12 +28,15 @@ my $query = new CGI; my $admin = C4::Context->preference('KohaAdminEmailAddress'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "errors/500.tt", + template_name => "errors/errorpage.tt", query => $query, type => "opac", authnotrequired => 1, debug => 1, } ); -$template->param( admin => $admin ); +$template->param ( + admin => $admin, + errno => 500, +); output_with_http_headers $query, $cookie, $template->output, 'html', '500 Internal Server Error'; --