Handle 404s with the correct error page, and don't log them
This commit is contained in:
parent
90bd0a1ab4
commit
61272cd42c
|
@ -7,7 +7,6 @@ class ErrorController extends Zend_Controller_Action {
|
||||||
//We cannot show that.
|
//We cannot show that.
|
||||||
$this->view->layout()->disableLayout();
|
$this->view->layout()->disableLayout();
|
||||||
$this->setupCSS();
|
$this->setupCSS();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function errorAction() {
|
public function errorAction() {
|
||||||
|
@ -31,9 +30,9 @@ class ErrorController extends Zend_Controller_Action {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$exceptions = $this->_getAllParams();
|
//$exceptions = $this->_getAllParams();
|
||||||
Logging::error($exceptions);
|
//Logging::error($exceptions);
|
||||||
$this->error500Action();
|
$this->error404Action();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +73,7 @@ class ErrorController extends Zend_Controller_Action {
|
||||||
* 404 error - route or controller
|
* 404 error - route or controller
|
||||||
*/
|
*/
|
||||||
public function error404Action() {
|
public function error404Action() {
|
||||||
$this->_helper->viewRenderer('error-404');
|
$this->_helper->viewRenderer('error');
|
||||||
$this->getResponse()->setHttpResponseCode(404);
|
$this->getResponse()->setHttpResponseCode(404);
|
||||||
$this->view->message = _('Page not found.');
|
$this->view->message = _('Page not found.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<h2><?php echo _("Page not found!")?></h2>
|
<h2><?php echo $this->escape($this->message)?></h2>
|
||||||
<p><?php echo _("Looks like the page you were looking for doesn't exist!")?></p>
|
<p><?php echo _("Looks like the page you were looking for doesn't exist!")?></p>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a>
|
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a>
|
||||||
|
|
Loading…
Reference in New Issue