Forum

Thread tagged as: Question, Blog

Perch Blog

I have just noticed that in the blog if we change a published post to a draft then click on the old link , rather than display 404 page not found, we get the template page but without the content .

Is this the correct behaviour ? if so can it be changed?

Gary P

Gary P 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Perch doesn't know how you want to handle that situation (it doesn't even know that it exists) so if you want that behaviour you need to implement it.

You can issue a 404 status with http_response_code() but you'll need to do that before you output any HTML.

Gary P

Gary P 0 points

Ok found a solution.

Thanks

Gary