aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Root.pm10
-rw-r--r--t/app/controller/page_not_found.t2
-rw-r--r--templates/web/default/errors/page_error_404_not_found.html (renamed from templates/web/default/errors/page_not_found.html)0
4 files changed, 7 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index f0b70b2e6..661505a49 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -66,7 +66,7 @@ sub display : Path('') : Args(1) {
: $c->model('DB::Problem')->find( { id => $id } );
if ( !$problem ) { # bad id or id not found
- $c->detach( '/page_not_found', [ _('Unknown problem ID') ] );
+ $c->detach( '/page_error_404_not_found', [ _('Unknown problem ID') ] );
}
# elsif () {
diff --git a/perllib/FixMyStreet/App/Controller/Root.pm b/perllib/FixMyStreet/App/Controller/Root.pm
index 33f870986..830773542 100644
--- a/perllib/FixMyStreet/App/Controller/Root.pm
+++ b/perllib/FixMyStreet/App/Controller/Root.pm
@@ -68,20 +68,20 @@ Forward to the standard 404 error page
sub default : Path {
my ( $self, $c ) = @_;
- $c->detach('/page_not_found');
+ $c->detach('/page_error_404_not_found');
}
-=head2 page_not_found
+=head2 page_error_404_not_found
- $c->detach('/page_not_found', [ $error_msg ] );
+ $c->detach('/page_error_404_not_found', [ $error_msg ] );
Display a 404 page. Pass in an optional error message in an arrayref.
=cut
-sub page_not_found : Private {
+sub page_error_404_not_found : Private {
my ( $self, $c, $error_msg ) = @_;
- $c->stash->{template} = 'errors/page_not_found.html';
+ $c->stash->{template} = 'errors/page_error_404_not_found.html';
$c->stash->{error_msg} = $error_msg;
$c->response->status(404);
}
diff --git a/t/app/controller/page_not_found.t b/t/app/controller/page_not_found.t
index 9c8d7e5a6..05e983109 100644
--- a/t/app/controller/page_not_found.t
+++ b/t/app/controller/page_not_found.t
@@ -13,7 +13,7 @@ my $mech = Test::WWW::Mechanize::Catalyst->new;
$mech->get_ok('/');
# get 404 page
-my $path_to_404 = '/bad/path/page_not_found';
+my $path_to_404 = '/bad/path/page_error_404_not_found';
my $res = $mech->get($path_to_404);
ok !$res->is_success(), "want a bad response";
is $res->code, 404, "got 404";
diff --git a/templates/web/default/errors/page_not_found.html b/templates/web/default/errors/page_error_404_not_found.html
index 77db18e89..77db18e89 100644
--- a/templates/web/default/errors/page_not_found.html
+++ b/templates/web/default/errors/page_error_404_not_found.html