Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#5960 closed defect (bug) (fixed)

Members pagination and search_term in ajax request from placeholder in other languages

Reported by: An-tonio Owned by: imath
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.1
Component: Templates Keywords: has-patch commit
Cc:

Description

Wordpress: 4.0
Buddypress: 2.1.1

In members listing, ajax pagination is not working for other languages.

In ajax post Request I see that search_term is set to placeholder value (in spanish this is "Buscar usuarios..." and when paginate it get no results.

In english it work ok.

I think it can be the same problem with all search/listing/pagination.

Thanks.

Attachments (2)

5960.01.patch (742 bytes) - added by imath 6 years ago.
5960.02.patch (1.9 KB) - added by imath 6 years ago.

Download all attachments as: .zip

Change History (7)

#1 @imath
6 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.2

Hi An-tonio,

Thanks a lot for your feedback. this is a side effect of r9045. I'm using the placeholder because if javascript is disabled the pagination don't get the search_terms as the field value is empty.

I think we have two ways to solve this :

  • keep on using the placeholder to display the value of the search_term when the url contains a s parameter > see 5960.01.patch
  • or best IMHO, use the placeholder attribute for the default text bp_get_search_default_text() but use the value if a search was performed > see 5960.02.patch

@imath
6 years ago

@imath
6 years ago

#2 @imath
6 years ago

  • Keywords 2nd-opinion added

#3 @DJPaul
6 years ago

  • Component changed from Members to Theme / Template Parts
  • Keywords commit added; 2nd-opinion removed

I don't really understand the root issue with the pagination here, but 5960.01.patch looks like the way to go. The 02 patch seems overcomplicated.

#4 @imath
6 years ago

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

In 9201:

On members directory, make sure the AJAX search request is not using the default placeholder as search terms.

Fixes #5960

#5 @DJPaul
4 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.