Error page

Hello again,

My custom error page is not taken into consideration. Whenever a page is not found, this appears: http://prntscr.com/8qeycm . I created my error.html.twig inside theme templates folder. It used to work. Is there anything inside settings that I need to modify?

Thanks for your help.

One more question…how can i redirect to a created page by route? $this->redirect(‘route’)?

Check that the Error Plugin is installed and enabled

That one fixed, thanks. But is it possible to get redirected to a 404 page instead of dispatching the 404 template? I mean, instead of having faulty url to have something like www.example.com/404

If I’m correct, the Error plugin does not do this now. The URL stays the same. You can create your own version of the Error Plugin, add a /error404 page and add call

$this->grav->redirect($this->config->get('plugins.error.routes.404', '/error404'));

Thanks it worked:

public function onPageNotFound(Event $event)
{
$this->grav->redirect(’/error’);
on Error plugin, /error being the route of my error page