WordPress.org

Ready to get started?Download WordPress

Forums

404 template never called - not found shows all pages (major security issue) (18 posts)

  1. bobo_italy
    Member
    Posted 6 years ago #

    I have some blogs that I'm upgrading to wordpress 2.5. One of them has a custom homepage set in options > reading. On this blog writing a wrong url in the address fields make all the pages defined in the blog to come up one after another. I don't have password-protected pages, but I think they're coming out also... The 404 template is not called.
    Setting no custom homepage solves the problem, but please a fix is needed. Thanks.

  2. bobo_italy
    Member
    Posted 6 years ago #

    I need to add that the is_404() function always returns false.

  3. DianeV
    Member
    Posted 6 years ago #

    Does your theme have an actual 404.php page?

  4. bobo_italy
    Member
    Posted 6 years ago #

    Yes I have it.

  5. bobo_italy
    Member
    Posted 6 years ago #

    No one has any idea on how to fix it?

  6. DianeV
    Member
    Posted 6 years ago #

    I'm not sure what you mean by "writing a wrong url in the address fields". What address fields are you referring to?

  7. bobo_italy
    Member
    Posted 6 years ago #

    The browser address bar. Say I go to "http://www.example.com/a/", on example.com there's wordpress 2.5, "a" isn't the name of any wordpress' page and in wordpress I selected to have a static home page instead of the last posts, then I will see all the pages defined in the wordpress installation on "http://www.example.com/a/".
    In fact I discovered this because I tried to access my admin and pushed return after only writing "wp" (never completely trust autocompletes :D ).

    Thanks

  8. rrdonuts
    Member
    Posted 6 years ago #

    I am having the same issue.

    Visit:
    http://www.roundrockdonuts.com/404
    and you will see what the problem is.

    I have a 404.php page in my theme and this is a fresh WordPress 2.5 install. I also am using a static page for the home page of the site.

  9. rrdonuts
    Member
    Posted 6 years ago #

    I tried to switch to the default theme to see if it was an issue with my theme, but it was not.

    My .htaccess looks the same as another site I am using with a similar setup (that is still on 2.3) that is working just fine.

    Any help much appreciated.

  10. natecook
    Member
    Posted 6 years ago #

    This bug shows up when the "Posts" page isn't set. Try this:

    1. Create a new page for your posts
    2. Go to the Settings - Reading page
    3. Select your new page from the "Posts page" dropdown list

    Hope that helps...

  11. rrdonuts
    Member
    Posted 6 years ago #

    That seems to have fixed it.

    I just created a page called "404 Fix" that will not be linked to.

  12. Troy Cawley
    Member
    Posted 6 years ago #

    This fixed mine, also.
    Thanks, natecook!

    As a follow-up, can someone explain what the "Posts page" is for?

    (Not necesasry ... extra credit work for you eager pupils.) ;-)

  13. kilbot
    Member
    Posted 6 years ago #

    Thanks for sharing that fix natecook, I just spent an hour scratching my head on this bug.

    I hope it is a bug, not a 'feature'. ;p

  14. Paul Menard
    Member
    Posted 6 years ago #

    So I guess this was NOT fixed in 2.5.1?

  15. cogdog
    Member
    Posted 6 years ago #

    I am not having luck with this fix. My WP 2.5 site has a 404 template. Previously, creating a bogus URL would generate a long running output with a concatenation of every page on my site. With this fix, (creating an unused Page and pointing the Post Pages menu to it, I get a blank (no HTML in the source) return page.

    This site is a bit out of the usual structure - all the content pieces are WP page, there are now no Posts. I create a dummy post, yet I still get a blank for what should be my 404 template.

    For TryoCawley - I do sites that do not put typical blog chronology on the front gae- I set the main front page to point at an existing WP page as the entry way tot he site. I would use a Posts Page as one templated to do a more traditional blog-like output on an internal page.

  16. cogdog
    Member
    Posted 6 years ago #

    Never mind -- the less than stellar template I am using had an extraneuos php endif statement

  17. chrisbirchall
    Member
    Posted 6 years ago #

    Hi CogDog.

    I have exactly the same (blank page) issue after doing "the fix".

    How about being a TopDog and telling me where to start looking for extraneous php endifs

    Thanks in advance

    Chris
    beautyphoto.com

  18. lupka
    Member
    Posted 5 years ago #

    holy crap. natecook. you just saved my life.

Topic Closed

This topic has been closed to new replies.

About this Topic