TPAC: search returns no results after selecting two facets

Bug #1092946 reported by Jim Keenan
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.2
Fix Released
Medium
Unassigned
2.3
Fix Released
Medium
Unassigned

Bug Description

C/W MARS, Evergreen 2.3

TPAC: search returns no results after selecting two facets

To reproduce:

In Basic Search, search dark is rising, default filters.
http://bark.cwmars.org/eg/opac/results?fi%3Aitem_type=&query=dark+is+rising&qtype=keyword&locg=1

Click Personal Author, Cooper, Susan 1935-
http://bark.cwmars.org/eg/opac/results?query=dark%20is%20rising;qtype=keyword;locg=1;facet=author%7Cpersonal%5BCooper%2C%20Susan%201935-%5D

Click Geographic Subject, England
http://bark.cwmars.org/eg/opac/results?query=dark%20is%20rising;qtype=keyword;locg=1;facet=author%7Cpersonal%5BCooper%2C%20Susan%201935-%5D;facet=subject%7Cgeographic%5BEngland%5D

Without touching anything else, click the Search button again - "Sorry, no entries were found..."
http://bark.cwmars.org/eg/opac/results?facet=ARRAY%280x7fdb2be2d880%29&fi%3Aitem_type=&query=dark+is+rising&qtype=keyword&locg=1&sort=

Note: raw ARRAY address exposed in URL.

Tags: pullrequest
Revision history for this message
Dan Pearl (dpearl) wrote :
tags: added: pullrequest
Revision history for this message
Simon Mai (simonmai) wrote :

This bug is interesting. I did check on your page, and it really happened as you mentioned.
But you know, it doesn't happen with our libs's page (using Evergreen 2.2)
You can try to reproduce at this: https://campbelld.mnpals.net/eg/opac/home
I bet it will not happen like your page. Whenever you click on Search button, it will search the keyword again and return the result as we expected.
In my opinion, since the search form use the GET method, whenever we click on Search button, it should only send the query URI with elements of search form only without the facets array.
I'm trying to figure out why it has happened in your page. And hopefully somebody can find out the solution soon.

Revision history for this message
Simon Mai (simonmai) wrote :

I think I know why you got no result now. The problem is in my attached picture. You can see:
- in your page using Evergreen 2.3, after we select 2 facets, the search form will appear a hidden input as facet (I'm wondering if this is the new feature Evergreen created to keep the selected facets even when you click Search button again, but it's not working well though)
- in our page using Evergreen 2.2, after I select 2 facets, the search form still have no hidden facet input. So the page only search the keyword without selected facets, that's why I got result with no error.
Actually, our libs are happy with this current way of search result. I don't know why you want to insert the hidden facet input into the search form to keep the facet values. In my opinion, whenever you click on the search button, it should start search the keyword again with no selected facets.
I will work on this bug after Xmas holiday. Hopefully we will figure out this bug soon.
(In picture: our page is in the left side)

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

Hi Simon,

It looks like Dan already has a potential fix with a pullrequest tag for this particular bug report. But you might want to take a look at https://bugs.launchpad.net/evergreen/+bug/1091659, which gets at the whole issue you just raised about not maintaining the facet when launching a new search.

Revision history for this message
Simon Mai (simonmai) wrote :

Oh, ok Kathy, I didn't see the Dan's fix before. That's is exactly what I'm thinking about how to fix for this bug.
But actually as I mentioned before, I don't think we should maintain the selected facets when click on a new Search again.
That's the searching way of other products that we've been using as ALEPH, VUFIND, ...

Revision history for this message
Dan Scott (denials) wrote :

Thanks Dan (and Simon and Kathy!); I've posted a branch that fixes both this problem and bug 1091659 over in bug 1091659 - it takes the approach that the hidden form vars are the root of the problem, as Simon suggests.

Revision history for this message
Ben Shum (bshum) wrote :

Tested and works well for me. Thanks Dan!

Picked to master, rel_2_3, and rel_2_2. I'll note the fix and targets on the related bug as well.

Changed in evergreen:
status: New → Fix Committed
milestone: none → 2.4.0-alpha
importance: Undecided → Medium
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.