user profile link giving a 404 error
-
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 themeThank you
-
can you post a link to an example?
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.
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?
Yeah, I get the full url link which is:
http://MYURL.co.uk/forums/users/StephenWright/which of course is then not a localhost, so that’s why it doesn’t work?
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.
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 ) ); ?>
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
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.
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.
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?
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
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?
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
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/.
Great – glad you’re fixed !
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 …
Okay, this seems to be an old issue but I’m having the same problem now.
How about having a shortcode that just does it?
I didn’t see a bbpress ‘users’ shortcode amongst those listed in the documentation.Or is there another fix to this problem…
@joopstringer where do I add the code you suggested?I’m setting up a site and only my admin user page comes up, all others are 404 pages.
Any help please?How about having a shortcode that just does it?
Won’t work since profiles are dynamic public pages, might work if it was private profile pages though.
I didn’t see a bbpress ‘users’ shortcode amongst those listed in the documentation.
Because there is none.
@joopstringer where do I add the code you suggested?
His code is SQL query code that you input into phpMyAdmin.
I’m setting up a site and only my admin user page comes up, all others are 404 pages.
It could be many possibilities but I will explain that in your other topic.
Hi, i met this issue, and for future ppl who would face the same problem, here is a simple fix that worked for me : http://zzlatev.com/bbpress-404-header-in-users-profiles/
it’s an issue with 404 being catched and not letting bbpress show the profile page, evenif it exists. You can add this in the theme function file :
function bbp_fix_users_404_headers() { if ( ! function_exists( 'bbpress' ) ) return; $bbp = bbpress(); if ( !empty( $bbp->displayed_user ) && is_404() ) { global $wp_query; $wp_query->is_404 = false; status_header( 200 ); } } add_action( 'wp', 'bbp_fix_users_404_headers' );
I have the exact same problem, CKRIEGEL, I tried your solution but it did not work for me.
I use the Hello theme by Elementor and the Elementor page builder.
Please take a look at my site.
Just click on one of the users and you’ll see 404 page.
Any help will be much appreciated.
Thank you!
@idomosko – It appears that you have fixed this issue on your site. How did you do it?
I’m using the Hello theme by Elementor as you were and am having the same issue. @ckriegel’s solution didn’t work for me. When I activate the 2019 theme instead, the profile pages and edit profile page appear just fine. But not with the Hello theme activated.
Anybody else figure this out?
can you ask this is the elementor support as well – seems like a lot of people get hassle with elementor and bbpress eg
no idea if this will help
- You must be logged in to reply to this topic.