Opened 9 years ago
Last modified 8 years ago
#6731 new defect (bug)
search as page/post slug redirects to home
Reported by: | modemlooper | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Contributions | Priority: | high |
Severity: | normal | Version: | 2.2 |
Component: | Core | 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)
#2
@
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
@
9 years ago
why not change
define( 'BP_SEARCH_SLUG', 'search' );
to
define( 'BP_SEARCH_SLUG', 'bp-search' );
#4
@
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
@
9 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
@
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.
#9
@
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.
Create a page on a site with slug "search" BP active and the page gets redirected to home.