[buddypress-trac] [BuddyPress Trac] #7779: BP Nouveau: Ajax searching is broken in Activity directory
buddypress-trac
noreply at wordpress.org
Sun Apr 29 12:41:14 UTC 2018
#7779: BP Nouveau: Ajax searching is broken in Activity directory
--------------------------+-----------------------------------
Reporter: imath | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Templates | Version:
Severity: normal | Keywords: has-patch 2nd-opinion
--------------------------+-----------------------------------
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 ;)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7779>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list