Skip to:
Content

BuddyPress.org

#7779 closed defect (bug) (fixed)

BP Nouveau: Ajax searching is broken in Activity directory

Reported by: imath Owned by: imath
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Templates Keywords: has-patch commit
Cc:

Description

This one was a bit of an history quest !

An important function disappeared during this code review (june 2017) :
https://github.com/buddypress/next-template-packs/commit/1df387d3146ffd4271d431aec1b8d715218ee261#diff-ce2d59a113459ec2d423b95e2a228d2e

The name of the function is/was :) bp_nouveau_search_object_data_attr() it is/was used to dynamically populate the data-bp-search attribute according to the displayed context and needed by the bp.Nouveau.searchQuery() function of the common JavaScript file (buddypress-nouveau.js).

Moreover, the data-bp-search attribute was added to the form element in src/bp-templates/bp-nouveau/buddypress/common/search/search-form.php and hardcoded to groups for a reason I ignore..

This is not good for the bp.Nouveau.searchQuery() which expects it to be on the form's parent element.

Applying the attached patch fixes the issue for the Activity directory : Ajax searching/Search reset is back and works great.

But there are good chances the same issue spreaded to the other directories, so i'll need to check them also.

If you're ok with the suggested fix, i'll adapt the other components accordingly. The patch has no impact on the layout ;)

Attachments (1)

7779.patch (1.9 KB) - added by imath 19 months ago.

Download all attachments as: .zip

Change History (7)

@imath
19 months ago

#1 @imath
19 months ago

The patch is also fixing Ajax Searching for the Members directory 💪

#2 @imath
19 months ago

The patch is also fixing Ajax Searching in Groups directory and single group's members screen ✅

#3 @hnla
19 months ago

oops hold my hand up to the search form data attr, not sure why I removed the function and hardcoded 'group' however there may have been a reason lurking around.

#4 @hnla
19 months ago

Lets commit!

#5 @imath
19 months ago

  • Keywords commit added; 2nd-opinion removed
  • Owner set to imath
  • Status changed from new to assigned

Thanks for looking at it, i'll commit asap ;)

#6 @imath
19 months ago

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

In 12015:

BP Nouveau: fix Ajax search in directory pages & group members screen

Fixes #7779

Note: See TracTickets for help on using tickets.