Opened 7 years ago
Closed 7 years ago
#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)
Change History (7)
#2
@
7 years ago
The patch is also fixing Ajax Searching in Groups directory and single group's members screen ✅
#3
@
7 years 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.
The patch is also fixing Ajax Searching for the Members directory 💪