Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2011 at 00:15 UTC
Updated:
13 Jun 2013 at 19:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerCould you provide an export of the view and a screenshot? It's kind of hard to follow what you exactly did.
Comment #2
dawehnerUpdate status.
Comment #3
ZuluWarrior commentedHere's some info, please find attached an export of the view, and a couple of screenshots, one proving the 'number of items to show' exposed works when set, the other showing the empty output when selecting 'All'.
I notice that in order for the number of results to match the number displayed in the drop down when the page first loads, you have to set the 'Items per page' of the pager to the same number as the first in your drop down list. Any other vlaue in 'items per page' causes incorrect results.
Comment #4
ZuluWarrior commentedComment #5
dawehnerOh wait this could be a problem of search_api. Did you tryed it with a normal view page, for example nodes?
By manually trying it out, it works as expected.
Comment #6
ZuluWarrior commentedThanks dereine,
you my well be right there, so I've (attempted) to move the issue to search_api
Comment #7
drunken monkeyDidn't know there was such an option, but the attached patch should fix this oversight.
Please try it out!
Comment #8
shiff2kl commentedI had this issue as well. I applied the patch and it now works as expected. Thanks.
Comment #9
sun-fire commentedThe patch from #7 works for me.
Comment #10
dawehnerWhat about for checking either limit of offset?
Comment #11
adel-by commentedpatch at #7 works for me.
Thanks
Comment #12
shiff2kl commentedPatch #7 works for me. Can this get included into the module?
Comment #13
phenaproximaThe patch in #7 worked for me too. Thank you, drunken monkey!
Comment #14
r2integrated commentedConfirming #7 works. Cheers!
Comment #15
Anonymous (not verified) commentedChanges in #7 work fine to fix the "View all" issue with search api (solr) based views.
There is still a problem when using the view with a contextual filter (/taxonomy/term/%). In this case, as soon as the filter "Items per page" is exposed, I always get an empty output (even when selecting a specific number of items per page). I took a look at Solr logs, and the query is not even performed.
Has anyone experienced anything similar?
Thanks!
Comment #16
Anonymous (not verified) commentedAnd, as usual, I've found the answer after posting here!
I had wrongly set the "user input required" in the exposed filter options.
BTW It would be nice to see this patch committed. Thanks!
Comment #17
drunken monkeyIf you've successfully tested a patch (especially if you aren't the first one), then please set the status to "reviewed & tested by the community". Otherwise, I'm bound to overlook some already tested patches.
Anyways, thanks for bumping, and thanks to you all for testing! Funny, that an 18-months-old patch still applies perfectly …
However, right before committing I stumbled upon another view of mine which I have set to show no (0) items. With the patch applied, it now too showed all items, which is of course not desirable. I had therefore to come up with a new patch, which you can find attached. The problem is that Views is incosistent in the value it uses to specify “All items” – see #2004580: $query->limit should be NULL if "All" option is selected. In the attached patch, I just work around the fact, hoping a possible solution for the Views issue won't break this fix.
I also incorporated the critique in #10, which was of course also true: there might still be an offset, even if all items are shown.
So, please test the attached patch to see if it, too, fixes the bug for you. Then I can finally get it committed.
Comment #18
drunken monkeyComment #19
Anonymous (not verified) commentedUpgraded to Search API 7.x-1.6. "View All" shows no results.
Reapplied patch in #17. "View All" works fine. All other searches I have defined in my website work as well.
Comment #20
drunken monkeyExcellent, thanks for testing again!
Committed.