@@ -, +, @@
better translatability
- Apply patch
- Trigger 404 error by calling a page that does not exist
- Try to trigger other error pages and/or carefully review code changes
in the *.pl files
---
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/500.tt | 29 -----------
.../en/modules/errors/{404.tt => errorpage.tt} | 16 +++---
.../opac-tmpl/bootstrap/en/modules/errors/404.tt | 54 --------------------
13 files changed, 38 insertions(+), 220 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/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
--- 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/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 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 ) %]
-
-
- [% INCLUDE 'navigation.inc' %]
-
-
-
- [% 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 %]
--