Advanced Member Search not working?  

  RSS

beowulf68
(@beowulf68)
Active Member Customer
Joined:9 months  ago
Posts: 5
19/11/2017 10:29 am  

Hi,

I would like to search on "About Me" and my own fields. However when I add in "About Me" and do a search on Member Search, the user does not appear.

If I search for Display Name or Nickname it works OK, but not with any other fields.

I tested this on a fresh Wordpress install with just wpforo and user custom fields addon.

Thanks!


ReplyQuote
beowulf68
(@beowulf68)
Active Member Customer
Joined:9 months  ago
Posts: 5
26/12/2017 5:08 pm  

Hi gVectors Support

Any update on this?

 

wpForo - Forums - Version 1.4.3

 wpForo - User Custom Fields - Version 1.0.3

 

My database and server info:

Database Server

  • Server: Localhost via UNIX socket
  • Server type: MariaDB
  • Server version: 10.1.28-MariaDB-1~xenial - mariadb.org binary distribution
  • Protocol version: 10
  • User: kelaberetiv2@localhost
  • Server charset: UTF-8 Unicode (utf8)

Web server

  • nginx/1.13.6
  • Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 
  • PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
  • PHP version: 7.0.25-1+ubuntu16.04.1+deb.sury.org+1

ReplyQuote
Tom
 Tom
(@tomson)
Support Team Admin
Joined:3 years  ago
Posts: 2650
26/12/2017 7:53 pm  

It seems you've not changed the Member Search type to Filter in Dashboard > Forums > Settings > Members admin page.

wpForo Member Search Types

Edited: 6 months  ago

ReplyQuote
beowulf68
(@beowulf68)
Active Member Customer
Joined:9 months  ago
Posts: 5
27/12/2017 4:59 am  

Yes, it has been changed to Filter since day one.

Can you advise on the right MySQL setting to use? I recall someone on the forum (either this or the public one) about need to use the correct. Mine is currently set to UTF-8 Unicode (utf8).


ReplyQuote
beowulf68
(@beowulf68)
Active Member Customer
Joined:9 months  ago
Posts: 5
27/12/2017 5:54 am  

Hi Tom,

I found the following bug in wpforo code - a typo - searhMembers instead of searchMembers in dbManager.php.

* grep for searhMembers

kelaberetiv2@dep-kelaberetiv2:~/public/wp-content/plugins$ grep -r 'searhMembers' *
wpforo-user-custom-fields/includes/dbManager.php: public function searhMembers($searchThese = array(), $userIds = array()) {

 

* grep for searchMembers

kelaberetiv2@dep-kelaberetiv2:~/public/wp-content/plugins$ grep -r 'searchMembers' *
wpforo-user-custom-fields/includes/helper.php: add_filter('wpforo_member_search_users_include', array(&$this, 'searchMembers'));
wpforo-user-custom-fields/includes/helper.php: public function searchMembers($userIds) {
wpforo-user-custom-fields/includes/helper.php: $userIds = $this->dbManager->searchMembers($searchThese, $userIds);


ReplyQuote
beowulf68
(@beowulf68)
Active Member Customer
Joined:9 months  ago
Posts: 5
27/12/2017 8:56 am  

Hi Tom,

My engineer fixed the bug.  See below.

 

Cheers!

In the file wpforo/wpf-themes/classic/index.php there is the line hardcoded -  

$search_fields_names = WPF()->member->get_search_fields_names(true);


This causes problem with wpforo/wpf-includes/class-members.php on the line-

if(!$only_defaults) $fields = apply_filters('wpforo_get_search_fields', $fields);


As it always will not evaluate and apply the custom search fields. So I commented off the if(!$only_defaults) and retained $fields = apply_filters('wpforo_get_search_fields', $fields); to force evaluation of the custom search fields.

 


ReplyQuote
pxt-wpforo-2018
(@pxt-wpforo-2018)
Active Member Customer
Joined:6 months  ago
Posts: 7
09/01/2018 5:37 pm  

I have just bought this plugin and have discovered issues with the clearly broken and untested code mentioned above.

I'll have to undo what I have set up so I can start from scratch, but the better outcome would be that someone from wpForo looks at this thread, sees the obviously broken and untested code and fixes it. From what people have said above, it doesn't look that complicated, but it takes someone to want to unit test the member search page.

It's a shame because the free plugin works so well, it has inspired me to invest in an addon which has not been unit tested.

I'll be back later with my first bug report of what is going to be a list of bugs unless someone looks at this thread.


ReplyQuote
Tom
 Tom
(@tomson)
Support Team Admin
Joined:3 years  ago
Posts: 2650
10/01/2018 1:57 am  

It's a shame because the free plugin works so well, it has inspired me to invest in an addon which has not been unit tested.

Please check the addon changelog before using such words. This issue has been fixed in 1.0.4 version. You just need to update it.


ReplyQuote
Share: