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.
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->setupCSS();
|
||||
|
||||
}
|
||||
|
||||
public function errorAction() {
|
||||
|
@ -31,9 +30,9 @@ class ErrorController extends Zend_Controller_Action {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
$exceptions = $this->_getAllParams();
|
||||
Logging::error($exceptions);
|
||||
$this->error500Action();
|
||||
//$exceptions = $this->_getAllParams();
|
||||
//Logging::error($exceptions);
|
||||
$this->error404Action();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -74,7 +73,7 @@ class ErrorController extends Zend_Controller_Action {
|
|||
* 404 error - route or controller
|
||||
*/
|
||||
public function error404Action() {
|
||||
$this->_helper->viewRenderer('error-404');
|
||||
$this->_helper->viewRenderer('error');
|
||||
$this->getResponse()->setHttpResponseCode(404);
|
||||
$this->view->message = _('Page not found.');
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<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>
|
||||
<div class="button-bar">
|
||||
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a>
|
||||
|
|
Loading…
Reference in New Issue