Notifications
Clear all

Advanced Member Search not working?

8 Posts
3 Users
0 Reactions
5,186 Views
Posts: 5
Customer
Topic starter
(@beowulf68)
Member
Joined: 7 years ago

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!

7 Replies
Posts: 5
Customer
Topic starter
(@beowulf68)
Member
Joined: 7 years ago

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
Reply
Posts: 4214
 Tom
Admin
(@tomson)
Famed Member
Joined: 10 years ago

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

wpForo Member Search Types
Reply
2 Replies
Customer
(@beowulf68)
Joined: 7 years ago

Member
Posts: 5

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).

Reply
Customer
(@beowulf68)
Joined: 7 years ago

Member
Posts: 5

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);

Reply
Posts: 5
Customer
Topic starter
(@beowulf68)
Member
Joined: 7 years ago

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.

 

Reply
Posts: 7
Customer
(@pxt-wpforo-2018)
Member
Joined: 7 years ago

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.

Reply
Page 1 / 2
Share:
Scroll to top