Many thanks for this powerful collection of modules, David. However, one small issue came up in testing: after performing a keyword search which has no matches, all nodes of all types are shown to the user as a search result. The list of nodes shown is restricted only by the view's other filters, regardless of whether faceted search has been set to only search a subset of available node types. The attached patch solves the problem for me.
As a side effect, unpublished nodes are presented to the user in these search results unless the view's filters already remove them from the listing, unlike in other faceted search results.
I tested with 5.x-0.x-dev as well, but this problem seems to have been fixed in the rewrite of the views integration.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | FS-keyword-all.png | 62.68 KB | tomboone |
| faceted_search_views.patch | 801 bytes | mvc |
Comments
Comment #1
David Lesieur commentedYes, this has been fixed in the "dev" version, as shown in the release notes (Faceted Search Views: Fixed view showing all available nodes when the search should return no results.). Thanks for the patch, could be useful to anyone wanting to fix the issue until the next release.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
tomboone commentedThis bug appears to be reoccurring in both beta3 and dev. I tested both releases on multiple sites with the same result: when there are no keyword matches, all nodes are displayed as results, limited only by the filters set in the view. The patch above won't fix the problem as the function (now named faceted_search_views_results_argument_handler) has been substantially rewritten.
When there are keyword matches -- or when searching only using other facets -- the results display fine.
(Love the module btw. Since I'm a librarian, this is a dream come true!)
Comment #4
David Lesieur commentedYou're right, just verified it and the bug is back.
A good case for unit tests...
Comment #5
David Lesieur commentedAs a workaround until this gets fixed, one might enable the "Use the Extracts display style selectively".
Comment #6
David Lesieur commentedJust committed a fix for this!
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.