Skip to:
Content
Pages
Categories
Search
Top
Bottom

The buddypress.org forum is generating 404 errors (?)

  • @rebootnow

    Participant

    I discovered this for my forum (via Google webmaster tools), then found that the forum here on BuddyPress.org is doing the same thing.

    It seems that the HTTP response has a 404 status code in the header, but the page content is correct (so it renders fine in the browser).

    I see this if I submit “http://buddypress.org/forums/” at http://web-sniffer.net/.

    I think it is related to deep integration. If I turn off the deep integration, the problem seems to go away.

    Anyone else experienced this? Am I missing something fundamental?

    ps. I’m on bbPress 1.0.2, WPMU 2.8.4a, BuddyPress 1.0.3.

    pps. My forum is throwing googlebot crawl errors and I suspect the same is true for the BuddyPress forums.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @takuya

    Participant

    1 in 10 or 20 times, this forum generates blank pages when I visit. Something wasn’t happening before.

    @rebootnow

    Participant

    I’ve also seen the blank pages.

    Returning to the 404 issue (and cross posting from https://bbpress.org/forums/topic/help-404-error-but-page-displays?replies=3#post-57822), it looks like WordPress is setting the 404 because it doesn’t recognize the bbPress page that is loading.

    When the global WP object is constructed, the function WP->handle_404 calls “status_header( 404 )”.

    As a workaround, I modified “handle_404” to lay off the 404 if “BB_PATH” is defined (i.e. when a bbPress page is loading). This seems to work ok.

    Here’s the new “handle_404” at around line 445 in “wp-includes/classes.php”.

    function handle_404() {
    global $wp_query;

    if ( !defined( 'BB_PATH' ) && (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {

    // Don't 404 for these queries if they matched an object.
    if ( ( is_tag() || is_category() || is_author() ) && $wp_query->get_queried_object() ) {
    if ( !is_404() )
    status_header( 200 );
    return;
    }
    $wp_query->set_404();
    status_header( 404 );
    nocache_headers();
    } elseif ( !is_404() ) {
    status_header( 200 );
    }
    }

    @rebootnow

    Participant

    This is really a WPMU issue, so I’ve posted it over there: https://mu.wordpress.org/forums/topic/14425?replies=1#post-83354

    I think this issue will stop Google (and other search engines) from indexing your forum pages. So if you are using deep integration it might be a good idea to watch for a patch.

    Use my little workaround at at your own risk.

    @rebootnow

    Participant

    I got some help on the bbPress forum and think I’ve sorted this out. I was loading “wp-blog-header.php” for deep integration, but loading “wp-load.php” seems to be better. No more 404 headers in the forum, and the RSS feed problem I had previously is also fixed.

    I suspect buddypress.org is using “wp-blog-header.php” because it is showing the same symptoms. Perhaps the admin here would like to try “wp-load.php”.

    Thread on bbPress forum:

    https://bbpress.org/forums/topic/deep-integration-google-might-not-be-indexing-your-forum-pages?replies=9#post-57859

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The buddypress.org forum is generating 404 errors (?)’ is closed to new replies.
Skip to toolbar