brocessing / kirby-webpack

:muscle: A Kirby CMS starter-kit with modern frontend tools
MIT License
179 stars 23 forks source link

Not receiving 404/Error page #39

Closed cn-d closed 6 years ago

cn-d commented 6 years ago

When I navigate to a route or page that doesn't exist I get a 200 response - successfully receiving a blank page when I should be receiving a 404.

EdwardLecock commented 6 years ago

I don't think this related to kirby-webpack. Anyway you can add a 404 status header yourself.

c::set('headers', array(
    'error' => 404,
));
cn-d commented 6 years ago

Hi Edward,

Thanks for taking the time to reply. I thought so too but I tried it on a fresh clone and I have the same problem. Also, I have a website using an older version of kirby-webpack and the site works as expected. So I'm not sure how to diagnose the problem. Setting a 404 header and template didn't help. Do you have any other suggestions?

c::set('headers', array(
    'error' => 404,
));
arnaudjuracek commented 6 years ago

Did you try with a content/error/error.txt page ?

cn-d commented 6 years ago

I feel rather silly, that was indeed the problem. I forgot the whole premise of kirby.