$this->error(“Post not found”) produces a 404 error

Notice: This thread is very old.
simonjcarr
Member | 28
+
0
-

Hi I am running through the Blog Tutorial and cant't get $this->error() function to work correctly.

In bootstrap.php i have

$configurator->setDebugMode(FALSE); // enable for your remote IP

but when I request a post that does not exist, I don't get a pretty error page I get

Page Not Found

The page you requested could not be found. It is possible that the address is incorrect, or that the page no longer exists. Please use a search engine to find what you are looking for.

error 404
Jan Mikeš
Member | 771
+
+1
-

It is expected behaviour to $this->error() produce 404. Check your ErrorPresenter (if you have set any) and change templates to make it looks different.

simonjcarr
Member | 28
+
0
-

Thank you.