Skip to:
Content
Pages
Categories
Search
Top
Bottom

user profile link giving a 404 error


  • nolimit966
    Participant

    @nolimit966

    Hi there,
    Im having problems viewing the user profile on my BBpress forum integrated in my website. When i try to click on the username of someone that has posted (for example – in the topics section) it takes you to a ‘page not found’ – 404 error page.
    Does anyone know how i can fix it so that it takes them to the profile page?
    I am using my own bespoke custom theme

    Thank you

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

  • Robin W
    Moderator

    @robin-w

    can you post a link to an example?


    nolimit966
    Participant

    @nolimit966

    its on my virtual machine so its a bit diffucult.

    Basically this user profiles page such as yourself: https://bbpress.org/forums/profile/robin-w/

    Comes up with a 404 page not found error.


    Robin W
    Moderator

    @robin-w

    may be a local host problem.

    when you hover over the username of someone that has posted you should see the intended URL at the bottom of the screen?


    nolimit966
    Participant

    @nolimit966

    Yeah, I get the full url link which is:

    http://MYURL.co.uk/forums/users/StephenWright/


    Robin W
    Moderator

    @robin-w

    which of course is then not a localhost, so that’s why it doesn’t work?


    nolimit966
    Participant

    @nolimit966

    im using IIS on a virtual machine & i’ve changed my config file to point to that specific URL as theres already a live site on that domain.


    nolimit966
    Participant

    @nolimit966

    I’ve figured it out the problem now, the URL is removing the space from in between the first name and surname so instead of being:

    http://MYURL.co.uk/forums/users/Stephen%20Wright/

    Its becoming:

    http://MYURL.co.uk/forums/users/StephenWright/

    Im not sure how to fix it though, ive had a look at the function its calling in the loop-single-forum.php file & it seems to be:

    <?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?>


    Robin W
    Moderator

    @robin-w

    ok, given that this is on your virtual machine, how much do you want to try and fix it?

    When you go live it will work on the internet, I have the majority of my users with spaces in their usernames


    nolimit966
    Participant

    @nolimit966

    I changed bb_author_link to bbp_get_bbp_author_link and it seems to work fine. Not sure that this is a very good method to fix this problem but it seems to work for now.


    Robin W
    Moderator

    @robin-w

    ok, did you filter to that code, or just replace it in the core?

    This is most likely an issue with IIS Rewrite Module not being configured correctly rather than a bbPress issue.

    If you plan on deploying this site to an IIS server (e.g. Azure) then I’d look to fixing the IIS Rewrites, if you are looking to host this site on a typical ‘Linux’ server using Apache or Nginx I’d look to swapping your local virtual server infrastructure to match that of your chosen host provider.


    nolimit966
    Participant

    @nolimit966

    the site was deployed last week & neither ways worked. The URL for the profile pages even on the live site points to the incorrect URL.

    The URL Should display (Space between first and last name):

    http://www.website.com/forums/users/firstname lastname

    Instead it displays:

    http://www.website.com/forums/users/firstnamelastname

    If there is no space the URL is incorrect. I no have users on my forum complaining of the issue.

    What is the best way to fix this?


    solosails
    Participant

    @solosails

    I’m having this issue too. (although t is not related to spaces in username as users without this have the same issue.

    It only happens for non admin users…

    Any updates on this issue?

    Cheers, Andrew


    solosails
    Participant

    @solosails

    It seems many many people are having this issue with various themes, I have managed to almost get mine working by tampering with the blog template settings..

    However it seems that this issue could be avoided altogether if the user page could be a shortcode in a hardcoded page instead of dynamically being created which is why so many themes are not doing it correctly.

    Surely BBPress could figure out a more stable way of doing this user profile page?


    joop.stringer
    Participant

    @joopstringer

    It’s incredible … bbPress seems to be in trouble when your permalinks (in WP) are set to TopicName and your usernames contains space. If you change the permalinks (in WP) to “default” there’s no problem. Check out this post as well: https://bbpress.org/forums/topic/404-error-on-user-profiles/#post-154972

    Except that all my othe links are not working anymore :-(

    So I wonder where the actual problem is … WP or bbPress


    phatmass
    Participant

    @phatmass

    I had the same problem and took a chance on this plugin that had zero feedback:

    https://wordpress.org/support/plugin/change-all-users-slug

    I ran it on all 4700 of my members with one click. After a couple minutes the plugin said it couldn’t change anything because all the usernames matched the display names.

    BUT… whatever it did, it FIXED the 404 errors! Now, all my users that have spaces in their names are taken to a profile page like this /john-smith/ instead of this /JohnSmith/.


    Robin W
    Moderator

    @robin-w

    Great – glad you’re fixed !


    joop.stringer
    Participant

    @joopstringer

    I just ran a very simple query over the user table
    Update wpusers set user_nicename = REPLACE( user_nicename , ‘ ‘, ‘-‘ ) ;

    This did the trick for me … It must be possible for bbPress to have the space replaced by a hypen in the function to create the userprofile link …

Viewing 18 replies - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.