Skip to:
Content

BuddyPress.org

#7881 closed defect (bug) (fixed)

Search from filter for bp_nouveau_search_form

Reported by: wbcomdesigns Owned by: imath
Milestone: 3.2.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Templates Keywords: has-patch dev-feedback commit
Cc:

Description

Inside legacy we have bp_directory_groups_search_form() with filter
which help to modify the search form without modifying template files.

We can keep the same approach for nouveau.
It's called directly without any filter
bp_nouveau_search_form()
inside
buddypress/bp-templates/bp-nouveau/buddypress/common/search-and-filters-bar.php

Attachments (1)

7881.patch (6.2 KB) - added by imath 16 months ago.

Download all attachments as: .zip

Change History (19)

#1 @DJPaul
16 months ago

  • Component changed from Groups to Templates
  • Milestone changed from Awaiting Review to Under Consideration

@imath Any ideas how to make this possible?

#2 @imath
16 months ago

  • Keywords needs-patch added

@DJPaul

After a quick look, I think the best is to buffer the template part inside bp_nouveau_search_form(), apply the legacy filter according to the displayed page to finally echo it.

I’ll add a patch to this ticket asap.

@imath
16 months ago

#3 @imath
16 months ago

  • Keywords has-patch reporter-feedback added; needs-patch removed
  • Milestone changed from Under Consideration to 3.2.0
  • Version set to 3.0.0

7881.patch is my suggestion to fix the issue.

It appears directory search filters are Core components ones, so I guess we should restore them asap, reason why I selected the 3.2.0 milestone.

In the patch, i'm also editing the bp_nouveau_message_search_form() function (unused so far) so that it's also possible to filter the new JS Template for the message search form. This is to restore the bp_message_search_form filter.

@wbcomdesigns can you test the patch and tell us if it fixes your issue ?

#4 @wbcomdesigns
16 months ago

Thanks, @imath I will update shortly, we need it for our plugin https://wordpress.org/plugins/bp-create-group-type/ it extends directory search with group type options.

#5 @vapvarun
16 months ago

@imath It's working perfectly.

#6 @imath
16 months ago

Thanks a lot for your feedback @vapvarun 👍 I'll wait for @wbcomdesigns' feedback so we are sure it's fine at 100% 😉

#7 @wbcomdesigns
16 months ago

@imath confirmed from our end as well, we have also tested with our plugin code.

#8 @imath
16 months ago

  • Keywords dev-feedback added; reporter-feedback removed

Awesome! Thanks a lot for your tests @wbcomdesigns. @DJPaul @hnla do you think we can improve the patch, or is it good to go ?

This ticket was mentioned in Slack in #buddypress by wbcomdesigns. View the logs.


16 months ago

#10 @DJPaul
16 months ago

Looks quite OK to me! Also agreed about 3.2 milestone. Thanks for everyone's work and contributions on this. :)

#11 @imath
16 months ago

  • Keywords commit added
  • Owner set to imath
  • Status changed from new to assigned

#12 @imath
16 months ago

In 12183:

BP Nouveau: bring back search form filters

Although it was already possible to override search form templates, as the following search form filters are not Legacy filters but Core components ones, we are bringing them back into the Nouveau template pack:

  • bp_directory_members_search_form
  • bp_directory_blogs_search_form
  • bp_directory_groups_search_form
  • bp_message_search_form

Props wbcomdesigns, DJPaul, vapvarun

See #7881 (branch 3.0)

#13 @imath
16 months ago

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

In 12184:

BP Nouveau: bring back search form filters

Although it was already possible to override search form templates, as the following search form filters are not Legacy filters but Core components ones, we are bringing them back into the Nouveau template pack:

  • bp_directory_members_search_form
  • bp_directory_blogs_search_form
  • bp_directory_groups_search_form
  • bp_message_search_form

Props wbcomdesigns, DJPaul, vapvarun

Fixes #7881 (trunk)

#14 @hnla
16 months ago

@imath took a while to figure out what was being addressed here and why, but updated and checked things over and it all looks ok.

@vapvarun are you and @wbcomdesigns actually the same person? :)

#15 @vapvarun
16 months ago

@hnla Wbcom Designs is our agency and we are training our in-house developers to get familiar with reporting issues and providing patches at trac as @wbcomdesigns and once they feel confident they can submit issues/fixes standalone.

#16 @imath
14 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening the ticket as the single group search form has not been taken in charge. See #7955

#17 @imath
14 months ago

In 12206:

BP Nouveau: bring back the single group members search form filter.

This specific filter was forgotten in r12183, the bp_directory_members_search_form filter is also fired when bp_groups_members_template_part() displays the single group members loop.

See #7881
See #7955
(branch 3.0)

#18 @imath
14 months ago

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

In 12207:

BP Nouveau: bring back the single group members search form filter.

This specific filter was forgotten in r12184, the bp_directory_members_search_form filter is also fired when bp_groups_members_template_part() displays the single group members loop.

Fixes #7881
See #7955
(trunk)

Note: See TracTickets for help on using tickets.