All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Set Search Fields Filter Not Filtering Correctly

Edolyne Long 12 Aug 2014 20:31 problem, active

I am trying to filter a low reorder set using the search field filters for an exact match and have attempted to use = which returns no results and \W which then brings up a database error.

Replies

  1. Low 12 Aug 2014 20:33

    What is the type of the field you're targeting, and what is a sample value of that field? Also, what are your LR, EE and PHP versions?

  2. Edolyne Long 12 Aug 2014 20:40

    The field is a playa relationship with a value of it. Aside: it's a url-title that can't be easily changed as we just talked though that scenario.

    We are currently running:

    LR v2.2.2
    EE v2.8.1
    PHP v5.3.27

  3. Low 12 Aug 2014 20:43

    Open up base.low_reorder.php and look up line 527 (using version 2.2.3) which reads:

    $item = '[[:<:]]'.preg_quote(substr($item, 0, -2)).'[[:>:]]';


    Change that to:

    $item = preg_quote(substr($item, 0, -2)); 
    $item = str_replace("'", "\'", $item);
    $item = "'[[:<:]]{$item}[[:>:]]'";


    ...and you should be able to use the '\W' syntax without errors. At least that will get the field search filtering working as designed.