Skip to:
Content
Pages
Categories
Search
Top
Bottom

User profile returns 404


  • T
    Member

    @tcarr

    I am running bbpress 2.0.

    If I go to the following it loads OK:

    /myforum/users/admin

    If I go to any other user profile I receive a 404 error:

    /myforum/users/user_name

    The page still shows the profile though returns a 404 header.

    Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)

  • Anthony
    Member

    @adzbierajewski

    Whats the URL to your bbpress site? Is your htaccess file writable? Have you tried adding a trailing / to your profile url?


    aaclayton
    Participant

    @aaclayton

    Same problem, did you ever discover a solution?


    aaclayton
    Participant

    @aaclayton

    Ok, this is definitely NOT the most elegant solution, but I contrived a crude fix to the problem. Since the false 404 flagging was happening only on user profile pages, I added the following to my single_user.php template just before the header.

    global $wp_query;
    $wp_query -> is_404 = false;
    get_header(); // Loads the header.php template. ?>
    

    Basically I’m just forcing the profile page to not be 404. I may try to work out a better solution, but for the time being, this appears to work.

    EDIT: looks like the code snippet is having trouble displaying a greater than sign, anywhere you see > above, it should be a greater than sign (>).

    • This reply was modified 1 year, 12 months ago by  aaclayton.
    • This reply was modified 1 year, 12 months ago by  aaclayton.

    entr
    Participant

    @entr

    I posted about this issue.


    ralcus
    Participant

    @ralcus

    I had an issue with the profile pages 404′ing.

    In my case it was down to the ‘Forum Root’ i had set in the forum settings. I set a ‘Forum Root’ with a preceeding / like this ‘/forum’.

    I then ticked the ‘Prefix all forum content with the Forum Root slug (Recommended)’ box.

    This resulted in rewrite rules for the user pages like this
    [/forum/users/([^/]+)/?$] => index.php?bbp_user=$matches[1]

    which did not correctly match. I removed the proceeding slash from my ‘Forum Root’ so it looked like this ‘forum’ and then the rewrite rules that were created looked like this:
    [forum/users/([^/]+)/?$] => index.php?bbp_user=$matches[1]
    (no proceeding slash) and it worked.

    Maybe the ‘Forum Root’ should have any proceeding slash removed by default to account for this scenario?

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.