Search Formats limiter appears in left sidebar when search returns no results

Bug #1677902 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Medium
Unassigned

Bug Description

Evergreen 2.12

The "Search Formats" filter is supposed to be excluded from the search limiters that appear in the left sidebar (per bug 1005040). However, if a format filter is applied and the search returns no results, the format limiter *does* appear in the sidebar on the no-results page.

This is a regression introduced in commit f12cc285, when the exclusion was moved from adv_filter.tt2 to result/table.tt2. Since the no-results display (lowhits.tt2) doesn't include result/table.tt2, the Search Formats filter never gets excluded and therefore appears in the sidebar when the search returns no results.

Kathy Lussier (klussier)
Changed in evergreen:
milestone: none → 2.12.1
importance: Undecided → Medium
assignee: nobody → Kathy Lussier (klussier)
Revision history for this message
Mike Rylander (mrylander) wrote :

If I'm understanding you correctly, I think what you describe is a feature, not a bug. If the filters are displayed then you can selectively remove them to broaden the search and possibly get results. Am I misunderstanding?

Revision history for this message
Kathy Lussier (klussier) wrote :

Mike,

The format limiters are explicitly excluded from the search results page, but they appear on the low hits page. According to the comments, the reason it is excluded is because it has its own widget in the search bar. Is it the intended behavior to show them in one place and not the other?

Personally, I prefer to show them, particularly after an advanced search, for the reasons I described in bug 1669563. However, if they display, we need to address the bug also described in 1669563 where a format filter is duplicated when a new search is launched from the search bar.

Changed in evergreen:
assignee: Kathy Lussier (klussier) → nobody
Revision history for this message
Mike Rylander (mrylander) wrote :

AH! Yes, I was misunderstanding. I agree that the low-hits page should, by default, exclude the Format (basic search dropdown) filter, as Jeff says.

As for customized templates that add Search Formats to the advanced search page, I think that will require a bit of work on a few fronts. OTTOMH, I imagine we should make the basic search Format widget smarter so that it does not use a value if more than one is supplied in the URL, perhaps even hide it in that case -- that should cover the multi-select in custom templates bug part of 1669563. Then, the sidebar addition should only happen if there was more than one value passed. There's already logic to trim the filters displayed in table.tt2 that unconditionally ignores search_format, so that just needs to be made conditional on how many values were passed. That can then be copied into lowhits.tt2.

Sorry for the confusion ... does that plan seem like reasonable repayment for the noise? ;)

Revision history for this message
Kathy Lussier (klussier) wrote :

Yes, that plan makes sense to me. Thanks Mike!

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Speaking of adding Search Formats to the advanced search page, please see bug 1679309.

Changed in evergreen:
milestone: 2.12.1 → 2.12.2
Revision history for this message
Kathy Lussier (klussier) wrote :

Adding a note that, most likely through my work to relocate the advanced search limiter block, the format search limiters are now displaying on the search results page too. I'm still trying to track down the problem. Nothing leaps out at me yet.

Revision history for this message
Kathy Lussier (klussier) wrote :

OK, I think I've addressed both problems by moving the ignore search format filter block from table.tt2 to searchbar.tt2, where the advanced search limiters are now located. Since searchbar.tt2 is also part of the lowhits page, the change seems to carry over there too.

I'll test it a little more for breakage and adding a link to a working branch if it looks good.

I think the other pieces of this report (only showing the block if there are two or more search formats) can be part of bug 1669563.

Revision history for this message
Kathy Lussier (klussier) wrote :
tags: added: pullrequest
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :
Revision history for this message
Kathy Lussier (klussier) wrote :

Thanks for the signoff Jeff! Merged to master and release 2.12

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers