Skip to:

Opened 9 years ago

Last modified 7 years ago

#6731 new defect (bug)

search as page/post slug redirects to home

Reported by: modemlooper's profile modemlooper Owned by:
Milestone: Awaiting Contributions Priority: high
Severity: normal Version: 2.2
Component: Core Keywords: needs-patch


Create a page ona site with BP active and the page gets redirected to home.

Introduced here:

Change History (11)

#1 @modemlooper
9 years ago

Create a page on a site with slug "search" BP active and the page gets redirected to home.

#2 @boonebgorges
9 years ago

  • Keywords reporter-feedback added

Looking at this more closely, I think [10110] is unrelated. I'm fairly sure this dates back to [3490]. See #2710. I managed to reproduce on 2.3.x and 2.2.x, though I'd wager it goes back to 1.5.

The issue is this: BP's directory searches use AJAX. The no-js fallback is to send requests to /search/, at which point bp_core_action_search_site() grabs the request and reroutes it. This means that it's not possible to have a page called /search/ on a BP installation.

FWIW I think this is pretty crummy. There's no reason why we need to steal a pretty permalink for this purpose. We should just send search requests to bp_get_root_domain(), with $_POST['bp-is-search'] = 1 or something like that.

If you can verify that this is not a new problem, we'll fix this for 2.5.

#3 @modemlooper
9 years ago

why not change

define( 'BP_SEARCH_SLUG', 'search' );


define( 'BP_SEARCH_SLUG', 'bp-search' );

#4 @boonebgorges
9 years ago

Yeah, that'd require less of a change. But it just mitigates the problem, instead of eliminating it. It's an abuse of the URL parser that we are doing this in the first place.

Did you get a chance to verify against an earlier version of BP?

#5 @DJPaul
9 years ago

If the search handling in bp_core_set_uri_globals is changed however this is fixed, please also see

#6 @r-a-y
9 years ago

  • Keywords reporter-feedback removed
  • Milestone changed from 2.4.1 to 2.5

This is not a regression.

Tested on BP 2.3.4 and it happens there as well.

#7 @DJPaul
8 years ago

  • Milestone changed from 2.5 to 2.6

#8 @DJPaul
8 years ago

  • Milestone changed from 2.6 to Future Release

#9 @slaFFik
8 years ago

  • Milestone changed from Future Release to 2.8
  • Version changed from 2.4.0 to 2.2

Still valid for BuddyPress 2.7.2.
Although this is not a blocker, as people on forum seems not complaining about it (I didn't find), I would like to provide a fix in 2.8.

#10 @slaFFik
8 years ago

Related: #2767

#11 @DJPaul
7 years ago

  • Milestone changed from 2.8 to Future Release
Note: See TracTickets for help on using tickets.