Skip to:
Content

BuddyPress.org

Opened 11 years ago

Last modified 9 years ago

#6731 new defect (bug)

search as page/post slug redirects to home

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

Description

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

Introduced here:
https://buddypress.trac.wordpress.org/changeset/10110

Change History (11)

#1 @modemlooper
11 years ago

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

#2 @boonebgorges
11 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
11 years ago

why not change

define( 'BP_SEARCH_SLUG', 'search' );

to

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

#4 @boonebgorges
11 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
11 years ago

If the search handling in bp_core_set_uri_globals is changed however this is fixed, please also see https://buddypress.trac.wordpress.org/ticket/6325#comment:5

#6 @r-a-y
11 years ago

  • Keywords reporter-feedback removed
  • Milestone 2.4.12.5

This is not a regression.

Tested on BP 2.3.4 and it happens there as well.

#7 @DJPaul
10 years ago

  • Milestone 2.52.6

#8 @DJPaul
10 years ago

  • Milestone 2.6Future Release

#9 @slaFFik
10 years ago

  • Milestone Future Release2.8
  • Version 2.4.02.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
10 years ago

Related: #2767

#11 @DJPaul
9 years ago

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