ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Closed Pages Do Not Diplay "Page Not Found"

March 20, 2012 10:37am

Subscribe [4]
  • #1 / Mar 20, 2012 10:37am

    ACP Webmaster

    15 posts

    We have a nifty Page Not Found page set up that comes up if the URL is not found. Very nice.

    But I just noticed that if I create a page but leave its status to Closed, what you see if you go to that URL is just a page with our chrome but no content, but you do not see the Page Not Found message/page.

    Now granted, not many people are going to find pages we’ve create by not put up, but I wonder if this is by design or if I’m missing something…?

    Seems to me if a page is closed you should get the Page Not Found message. What if I decide to take a page down by clicking Closed but someone has a favorite to it they follow. They will see a blank and apparently ‘broken’ page as opposed to a clear Page Not Found error (that, among other things, says, ‘this page may have been removed.’

  • #2 / Mar 20, 2012 2:49pm

    MID

    166 posts

    Sounds like you need to use

    require_entry="yes"
    in your channel entries tag, and put
    {if no_results} {redirect="404"} {/if}

    inside the tag pair.

  • #3 / Mar 21, 2012 1:10pm

    Shane Eckert

    7174 posts

    Hey ACP Webmaster,

    Zack is right! Thanks for the assist Zack.

    Does this solve your issue?

    Please let me know.

    Cheers,

  • #4 / May 24, 2012 11:33am

    Trenbania

    4 posts

    Hi,

    I have the same issue, but I have

    require_entry="yes"

    already set. I’m getting 404s every time I would expect, except when an entry is closed - just a blank page.

    Any help more than welcome!

    Thanks
    Andy

  • #5 / May 25, 2012 4:15pm

    Shane Eckert

    7174 posts

    Hello Trenbania,

    What version of ExpressionEngine are you currently using?

    Thank you,

  • #6 / May 25, 2012 4:47pm

    Trenbania

    4 posts

    Hi Shane,

    We’re at version 2.4.0 currently…

    Thanks
    Andy

  • #7 / May 30, 2012 4:11pm

    Shane Eckert

    7174 posts

    Hello Trenbania,

    Can you past in your template code for me?

    I would like to see how you have this set up.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases