Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

#829 closed defect (bug) (fixed)

Fallback for directory search forms when javascript is turned off

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 1.1 Priority: major
Severity: Version:
Component: Keywords: directory search
Cc:

Description

On line 1037 of /bp-core/bp-core-templatetags.php, change:

<form action="<?php echo $bp->root_domain . '/' . BP_MEMBERS_SLUG  . '/?s='.$_REQUEST['members_search']; ?>" method="post" id="search-members-form">

to:

	<form action="<?php echo $bp->root_domain . '/' . BP_MEMBERS_SLUG  . '/search/' ?>" method="post" id="search-members-form">

On line 2193 of /bp-groups/bp-groups-templatetags.php, change:

<form action="<?php echo $bp->root_domain . '/' . groups_SLUG  . '/search/' ?>" method="post" id="search-groups-form">

to:

<form action="<?php echo $bp->root_domain . '/' . BP_GROUPS_SLUG  . '/?s='.$_REQUEST['groups_search']; ?>" method="post" id="search-groups-form">

---

On line 1314 of bp-blogs/bp-blogs-templatestags.php, change:

	<form action="<?php echo $bp->root_domain . '/' . blogs_SLUG  . '/search/' ?>" method="post" id="search-blogs-form">

to:

	<form action="<?php echo $bp->root_domain . '/' . BP_BLOGS_SLUG  . '/?s='.$_REQUEST['blogs_search']; ?>" method="post" id="search-blogs-form">

---

Right now, because the directory searches rely on Javascript/AJAX and a pseudo slug of /search/ which doesn't currently exist, if javascript is turned off, the directory search forms do not work at all.

The lines I have altered will fallback the form actions so directory searches will work even when Javascript is turned off.

Change History (5)

#1 @r-a-y
15 years ago

Oops! For the first changes (the member directory search), I reversed them by accident! But you should get my drift!

#2 @r-a-y
15 years ago

  • Milestone changed from 1.1 to 1.0.4
  • Priority changed from minor to major

#3 @apeatling
15 years ago

  • Milestone changed from 1.0.4 to 1.1

Milestone 1.0.4 deleted

#4 @apeatling
15 years ago

Not sure how this patch would work since the search variable is not set until it is submitted. What needs to happen is for the form to be changed to GET from POST.

#5 @apeatling
15 years ago

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

(In [1719]) Fixes #829

Note: See TracTickets for help on using tickets.