[buddypress-trac] [BuddyPress Trac] #5087: BP component as front page messes up blog search
buddypress-trac
noreply at wordpress.org
Thu Sep 3 15:16:58 UTC 2015
#5087: BP component as front page messes up blog search
-----------------------------------+------------------
Reporter: modemlooper | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.4
Component: Component - Any/All | Version: 1.5
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch |
-----------------------------------+------------------
Changes (by boonebgorges):
* keywords: 2nd-opinion => 2nd-opinion has-patch
* milestone: Future Release => 2.4
Comment:
[attachment:5087.diff] is a suggested strategy. It does the following:
- When parsing URIs, bail on URLs like `example.com/?s=foo` if a
BuddyPress component page is set to 'page_on_front'.
- The check has to go late in the `catchuri()` function, because we need
to be able to detect `current_action` in order to allow
`example.com/members/boone/activity?s=foo` to continue to work when
`members` is the front page. Not terribly elegant, but it gets the job
done.
- The change will break directory search boxes. I changed the default
Members directory search form so that the search term is in
`$_GET['members_s']` instead of `$_GET['s']`. The same fix would have to
be applied to the other components (mainly groups, since Activity doesn't
have a native search box).
The downsides of this approach, as I see them, are:
a. Any custom search forms or other routers that direct traffic to
`[member_directory_url]?s=foo` will break in cases where the front page is
set to the member directory. This is definitely a corner case, but worth
considering.
b. The URL `example.com/?member_s=foo` is not very attractive. I'm open to
better ideas for the URL param. For pagination we use `apage` for
activity, etc - maybe `msearch` is better, though it's equally
untranslatable.
I think what I'm suggesting here is imperfect, but better than the current
state of affairs. Anyone have thoughts about it?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5087#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list