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

Support archive

Range Search Producing PHP Error (Low Search v3.0)

Steve 15 Nov 2013 14:50 problem, complete

Low Search v.3.0 // ExpressionEngine v2.7.1

Receiving following error when performing range search:

****
A PHP Error was encountered

Severity: Notice

Message: Undefined index: settings

Filename: models/low_search_collection_model.php

Line Number: 90
****

Range query is following:

{exp:low_search:url collection="people" range-from:people_weight="{people_weight}" range-to:people_weight="{people_weight}"}

Please advise.

Thanks-

Replies

  1. Steve 15 Nov 2013 14:53

    UPDATE: All range searches are producing this error for me regardless of utilizing search url or search form protocols.

  2. Low 15 Nov 2013 14:58

    Not sure it's the range filter causing it. Can you post the whole template that triggers this error? You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.

    Also, how many collections do you have? Can you try and check each one's settings?

  3. Steve 15 Nov 2013 15:21

    Paste below (trimmed out some of the html to fit the paste size requirement):

    http://pastie.org/private/p4i6iof1zpz...

    3 Collections. Settings appear normal and are actually bare minimum (no weight settings and indices builds all completed)

  4. Low 15 Nov 2013 15:43

    I'll need to take a look myself. Please send SuperAdmin login credentials to hi at gotolow dot com if you can.

  5. Low 15 Nov 2013 15:54

    Actually, give this a shot. Open up /low_search/filters/lsf.ranges.php and look up line 112 to 121. That reads:

    ee()->db->select('entry_id')->from('channel_data');

    // --------------------------------------
    // Limit by channel ids?
    // --------------------------------------

    if ($channel_ids = ee()->low_search_collection_model->get_channel_ids($this->params->get('collection')))
    {
    ee()->db->where_in('channel_id', $channel_ids);
    }


    Change that to:

    $channel_ids = ee()->low_search_collection_model->get_channel_ids($this->params->get('collection'));

    ee()->db->select('entry_id')->from('channel_data');

    // --------------------------------------
    // Limit by channel ids?
    // --------------------------------------

    if ($channel_ids)
    {
    ee()->db->where_in('channel_id', $channel_ids);
    }


    Does that help?

  6. Steve 15 Nov 2013 16:00

    You're the man, Low.

    That got rid of the error and template is parsing as intended. Will be checking for accuracy with some stress testing but I think you nailed it!

    Thanks (will update accordingly).

  7. Low 15 Nov 2013 16:05

    Cool. Will add that fix to the next version.