Skip to:

Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#3047 closed defect (bug) (fixed)

User profiles return 404 headers

Reported by: pavelevap's profile pavelevap Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Component - Users Keywords: needs-patch commit
Cc: pavelevap@…



I am not sure if it is intended for any reason, but it is strange, I guess.

Attachments (1)

Screen Shot 2017-06-18 at 12.23.39 PM.png (344.1 KB) - added by johnjamesjacoby 7 years ago.

Download all attachments as: .zip

Change History (14)

#1 @espellcaste
7 years ago

My guess this is not a problem with bbPress, but with the bbPress site or server.

I have a community with bbPress installed and the profile returns the correct status code, 200.

#2 @pavelevap
7 years ago

It is strange, because I found this issue on my website and noticed the same behaviour on Maybe it is influenced by some settings?

#3 @netweb
7 years ago

  • Component changed from General to Component - Users
  • Milestone changed from Awaiting Review to Under Consideration


Need to dig around and see what has changed in the code around these two changesets r4256 or r4593

#5 @netweb
7 years ago


ocean90: @SergeyBiryukov See the linked tickets from @netweb. WP:handle_404() is kicking in. bbPress should probably make use of

#6 @johnjamesjacoby
7 years ago

  • Keywords needs-patch added
  • Milestone changed from Under Consideration to Awaiting Review

Sorry that I missed this. It should probably happen in 2.6.1.

#7 @johnjamesjacoby
7 years ago

In 6554:

General: Introduce bbp_pre_handle_404() to handle 404 overrides.

This only introduces the function for now. I'll go through and check all of the conditions next.

See #3047.

#8 @johnjamesjacoby
7 years ago

  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby

This should be pretty easy. I'll take a look at this tomorrow if nobody beats me to it. 🤞

This ticket was mentioned in Slack in #bbpress by thebrandonallen. View the logs.

7 years ago

#10 @johnjamesjacoby
7 years ago

I'm unable to duplicate this as-is, but did find the opposite problem, in that profiles that don't exist are showing 404 pages but returning 200 OK.

#11 @johnjamesjacoby
7 years ago

  • Keywords commit added

Related: #1973.

I wasn't able to duplicate the exact bug, but I've made improvements to how we handle 404's across all requests, and will resolve some related issues shortly, plus introduce some code to make handling our custom 404 conditions easier.

#12 @johnjamesjacoby
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 6583:

Better 404 handling:

  • Introduce bbp_is_404 query var, and set this in places where the default 404 condition needs to be overridden
  • Introduce bbp_set_200() for cases where a default of 404 needs to be set to a 200
  • Introduce bbp_get_wp_query() helper for getting the $wp_query global
  • Update bbp_set_404() to accept a $query parameter to make passing the query around easier
  • Update child-ids queries to use the last_changed cache to reduce the amount of cache churn when cleaning

Fixes #3047. See #1973.

#13 @johnjamesjacoby
4 years ago

#3267 was marked as a duplicate.

Note: See TracTickets for help on using tickets.