Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced Search Not Filtering by Category #150

Closed
benglick opened this Issue Mar 7, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@benglick
Copy link

benglick commented Mar 7, 2019

We just upgraded from EE2 to EE5.1.3 and our advanced search is no longer filtering by category. It is filtering by channel and keyword correctly, but the total is also wrong for the results displayed. For debug purposes I tried limiting it to a single category and channel with this code:


 < input type="hidden" id="cat_id" value="4" name="cat_id[]" />
 < input type="hidden" id="channel" value="2" name="channel_id[]" />

Note that in my actual code there is no space between "< input". For some reason it wasn't rendering here without the space.

This code limits by channel id correctly, but not by cat_id[]. It displays everything in the channel, regardless of category, with the matching keyword. I have triple checked the documentation, and I can't see anything that I am doing wrong. My opening search tag is:


{exp:search:advanced_form result_page="search/results" no_result_page="search/no-results" form_class="advanced-search"  results="10" search_in="everywhere"}

I have also stripped away the results page to the bare minimum, and it doesn't look like anything there is causing issues. I am using the {exp:search:total_results} tag, and in one particular search it says there is a total of 4 results, but it displays two pages of results (which is everything with that keyword in the specified channel). The actual total should be 7 for that particular search with the category filter working. However, I think if the problem with the category filtering is corrected, then the root of this may be fixed too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.