• Resolved user70

    (@user70)


    Hi, all was well until a participant reported not being able to find anything using the PDB search function.
    The issue is reproducible with the following combination of pdb_list attributes:
    [pdb_list search=”true” suppress=”true”]

    If I remove the suppress attribute or set it to false, then search works. Problem with that is I do not want a default list of participants shown – results should only be visible when a participant performs a search.

    Thoughts on what the problem may be?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Most likely, what is happening is that there are no results for the specific search that was entered.

    The best way to investigate this is to use the Plugin Debugging to see what the search query was, that will explain the results.

    Thread Starter user70

    (@user70)

    Thanks. It appears the logged query is incorrect:

    Log when suppress=true (FAIL)
    PDb_List::_setup_iteration list query: SELECT p.id, p.title, p.first_name, p.last_name, p.specialty, p.address, p.city, p.state, p.country FROM participants_database p WHERE p.id = "0" ORDER BY p.last_name ASC

      I am searching for a last_name, so the WHERE clause is incorrect
      I am certain the last_name exists in the database
      I mentioned in the original post that if I set suppress=false and run the search, it returns the correct result

    Log when suppress=false (SUCCESS)
    PDb_List::_setup_iteration list query: SELECT p.id, p.title, p.first_name, p.last_name, p.specialty, p.address, p.city, p.state, p.country FROM participants_database p WHERE p.approved = "Yes" AND (p.last_name LIKE "%morgan%") ORDER BY p.last_name ASC

    Any additional thoughts?

    Plugin Author xnau webdesign

    (@xnau)

    OK, from what I’ve been able to find, this problem is caused by the Combo Multisearch add-on. I will need to issue an update to that plugin to fix this.

    You can fix it immediately by editing one of the plugin files.

    In the file pdb-combo-multisearch/pdbcms/Search/Submission.php on line 86, you’ll see:

    $query->is_search_result(false);

    just comment that out like this:

    //$query->is_search_result(false);

    That should restore the expected function in the regular list search.

    Thread Starter user70

    (@user70)

    Thanks, that did the trick.
    I’ll keep an eye out for that update.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘pdb_list search stopped working’ is closed to new replies.