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

Support archive

Low Search with Custom Channel Statues - Zoo Visitor

Philip 13 May 2012 11:10 problem, complete

Hi, I'm using Zoo Visitor on a site to store additional member data. I was hoping to use Low Search for the member search, as the data is stored in a normal EE channel, rather than as member fields.

The problem I seem to be having relates to the entry statuses that Zoo Visitor uses. Zoo Visitor replicates the Member Group as a channel status. I've tested the basic Low Search examples and cannot get any results returned, even though the collections seem ok.

I created a test channel with standard EE statuses and the Low Search returns the test data from that channel. I tried specifying the Zoo Visitor status in the Low Search form ie.

{exp:low_search:form collection="tutor_search" loose_ends="yes" status="Subscribers-id6|Members-id5" result_page="site/search_results"}

But still no results.

Using the above example and changing the collection to my test collection data, I still only get results for entries with a status of "open" even though I specified other statuses.

So I'm guessing that the low search is currently only able to return results where the status is "open"?

Is there somewhere I can work around this, or can you provide a fix?

Thanks

Phil

Replies

  1. Low 13 May 2012 11:29

    have you tried setting the status parameter in the low_search:results tag?

  2. Philip 13 May 2012 11:34

    Perfect! Thanks. I was assuming the filtering was all controlled from the search form, like the EE form.

  3. Low 13 May 2012 11:45

    you could, using a (hidden) form input field instead of a parameter. Glad it's working now!

  4. Stephen 4 Mar 2013 13:40

    Just came across this issue myself (not with Zoo Visitor, but with the use of custom statuses other than 'open').

    Given that I have a status field in the search form (albeit, I left that dropdown as blank/any), why would you then have to also enter the status in the results tag? I had to enter status="not XXX" to get any results showing after much hair-pulling and re-building of collections.

    I noticed this after I'd just imported 20,000 new records too, so I was convinced my imports had messed up before I started searching these forums for any similar cases. :)

  5. Low 4 Mar 2013 13:51

    Given that I have a status field in the search form (albeit, I left that dropdown as blank/any), why would you then have to also enter the status in the results tag?


    This mimics native behaviour. If you leave out the status parameter in the channel:entries tag (or leave it blank), it will default to 'open'. Only if you explicitly set it to something else, the default is overridden.

    The same applies to search parameters. No/empty status = the default = open.

  6. Stephen 4 Mar 2013 13:58

    Ahh right, I'm with you now, sorry. So I guess my confusion has came due to being used to leaving other fields blank for 'any' rather than this EE behavior.

    So when using the status in a search form, what do you recommend to use for the 'any' value instead of blank? I'm currently using 'not XXX' but not sure if there's a better way.


    <label>Status</label>
    <select name="status">
    <option value="not XXX">Any</option>
    <option value="Custom Status A">Custom Status A</option>
    <option value="Custom Status B">Custom Status B</option>
    <option value="Custom Status C">Custom Status C</option>
    </select>


    Thanks,

    Ste

  7. Low 4 Mar 2013 14:03

    Yep, "not XXX" will work just fine. Personally, I've always taught my clients to reserve statuses (and the 'closed' status in particular) for whether an entry is available on the site or not: 'closed' should never appear on the site. So having a status "not closed" usually worked for me.

    In any other case "not non-existing-status" or something similar will show all, including closed, entries.

  8. Abhijeet Bhushan 6 Jan 2016 06:12

    I have created status "publish". Now I am using low search and when I try {exp:low_search:results query="{segment_3}" limit="10" status="open"} or {exp:low_search:results query="{segment_3}" limit="10"} then it shows me result if staus is open but I need to show results which status is "publish" so I have tried {exp:low_search:results query="{segment_3}" limit="10" status="publish"} and {exp:low_search:results query="{segment_3}" limit="10" status="open|publish"} but result is not showing the return result which is associated with status publish.

    Also I have tried with
    {exp:low_search:results query="{segment_3}" limit="10" status="not closed"}
    but still it is showing results which have status open only:(

    I am using version 4.4.1

    Low 6 Jan 2016 08:30

    This is a great conversation that's separate from the main one, so I created a new conversation to continue the discussion.

    Please reference the new conversation here: Entries with custom status not showing up in search results