0

I have a search form composed of category select fields. When choosing a particular category (2 Bedroom / 2 Bath) the results page isn't showing all entries. But, when viewing the "all floor plans" page and selecting "Two Bedrooms" I can see every entry.

Any ideas on why the Low Search form wouldn't be showing every entry from a selected category? The form seems to work, as it shows some of the entries, but why wouldn't it show all entries?

Here's the search form where you can select the 2 Bedroom / 2 Bath option under "Number of bedrooms?":

http://l45living.com/floor-plans

Here's the page listing all "Two Bedrooms" entries:

http://l45living.com/floor-plans/all/two-bedrooms

Notice how there are many more entries displayed on the "all/two-bedrooms" page. Template code (edited for brevity):

{exp:low_search:form
  form_id="floor-plan-search"
  query="{freebie_3}"
  result_page="/floor-plans/search#floor-plans"
}
  <select name="category[]">
    <option value="">Show me all the options!</option>
    {exp:channel:categories
      category_group="1"
      show="not 4"
      style="linear"
    }
      <option value="{category_id}"{if low_search_category ~ '/\b'.category_id.'\b/'} selected{/if}>
        {category_name}
      </option>
    {/exp:channel:categories}
  </select>
{/exp:low_search:form}

{exp:low_search:results
  channel="units"
  orderby="title"
  query="{freebie_3}"
  require_all="category"
  sort="asc"
}
  ...results shown here...
{/exp:low_search:results}

1 Answer 1

0

The URI /floor-plans/all/two-bedrooms doesn't look like a Low Search query, and therefore the Results tag won't filter entries. It's looking like it works as designed. This URL does seem to be showing the results you'd expect.

Edit Turns out there was another category selected so the form would filter by both categories rather than the one. Removing the other one solved the issue.

9
  • Correct, /floor-plans/all/two-bedrooms isn't a search query. That page is using a channel entries tag to show all entries marked with the "two bedroom" category. But, shouldn't the Low Search results page, as you linked to above, also show the same entries?
    – Eric
    Jun 10, 2015 at 12:28
  • My confusion is that it seems selecting "two bedrooms" in the drop down on the search form should return all entries marked with the "two bedrooms" category, but it's not returning all of them. The entries displayed on the URL you linked to above should exactly match the entries displayed on the "/floor-plans/all/two-bedrooms" page, correct? Aren't they both in effect doing the same thing...showing all entries marked with that category?
    – Eric
    Jun 10, 2015 at 13:18
  • That depends on how your template is set up. Are you expecting the Results tag to pick up on the /all/two-bedrooms segments? Because that wouldn't be the case.
    – Low
    Jun 14, 2015 at 12:10
  • No, I'm not expecting it to get any data from the other page. I'm just wondering why the search results don't show all entries. If you use the search form and only select "two bedrooms" it does return some of the two bedroom entries, but not all of them. Shouldn't that form return every entry categorized as "two bedroom"? I mention the "/all/two-bedrooms" page just because it's coded to show all entries marked "two bedroom", so it seems like both pages should show the exact same results.
    – Eric
    Jun 15, 2015 at 12:28
  • The "all/two-bedrooms" page is working correctly. That is a channel entries tag showing the "two-bedrooms" category, and it displays the correct number of entries. The search results page for "two bedrooms" doesn't show the correct number of entries. Some entries are not displayed, even though they have been categorized as "two bedroom".
    – Eric
    Jun 15, 2015 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.