We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Template Layouts with closed entries 404 error page issue

How Do I?

Neil Evans's avatar
Neil Evans
1,374 posts
8 years ago
Neil Evans's avatar Neil Evans

So i have a template setup: /staff/index

which loads: /layouts/_main

I then have a normal entry which loads through /staff/john-smith All works fine…

I have then closed the entry “John Smith”. I expected this to then output my 404 template. But instead it outputs the layout with no content in the body area. The Header responds 200 OK.

I have tried adding various if statements with redirect 404. But these do not work outside the {exp:entries} tag, and when inside the tag it still loads the layout template, empty content, but headers show 404.

So what i would like to know - is with a closed article (but valid URL), how to i get my 404!!!

Thanks, N

       
Neil Evans's avatar
Neil Evans
1,374 posts
8 years ago
Neil Evans's avatar Neil Evans

http://expressionengine.stackexchange.com/questions/25145/unexpected-results-when-using-redirect-404-and-template-layouts

I am guessing this is a bug that is unfixed or fresh in EE3, as it matches the above, and a few other issues on StackExchange. As no one seems to use these forums!

       
Jeremy S.'s avatar
Jeremy S.
353 posts
8 years ago
Jeremy S.'s avatar Jeremy S.

Have you reported it as a bug?

       
Neil Evans's avatar
Neil Evans
1,374 posts
8 years ago
Neil Evans's avatar Neil Evans

No, until others confirm, or EE chime in “in their own forums” i have not. I’ll stick to stack exchange though, i think its far more active!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.