Active
Project:
Facet API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2012 at 01:31 UTC
Updated:
7 Jan 2017 at 15:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drunken monkeyHm, sorry, I can neither reproduce nor explain this. What backend are you using? And about how long does the search string have to be?
Could you install the Devel module, apply the attached patch to the Search API and then report back what you're seeing when you try to reproduce the bug?
Comment #2
kyletaylored commentedI actually had this exact same issue yesterday. I don't know why, but what was happening was the Current Search block was showing up on non-search pages. Devel didn't do anything because nothing was being passed to $search. This helped me out.
Comment #2.0
kyletaylored commentedworks even with a shorter string
Comment #3
sepehr.sadatifar commentedI get the same error when the path doesn't exists, for example when viewing http://site/products/clothes/socks I get this:
Fatal error: Call to a member function getOriginalKeys() on a non-object in modules/contrib/search_api/contrib/search_api_facetapi/plugins/facetapi/adapter.inc on line 174.
I checked "$search" variable and it's NULL.
Comment #4
drunken monkeyThe workaround from #2 would of course work for us. However, the actual issue seems to be deeper, i.e., in the Facet API. As I understand it,
getSearchKeys()shouldn't be called ifgetCurrentSearch()returnsFALSE(which should be the case here – but maybe you can debug that to make sure?). So, moving this to the Facet API queue for possible insights.I still can't reproduce this, so have little chance of helping to debug.
@ sepehr.sadatifar: Do you maybe have some setup that executes a search on 404 pages, or some other special 404 mechanism?
Comment #5
cpliakas commentedTo me that logic makes sense since there shouldn't be search keys if Fact API doesn't know about any searches. Let's double-check the code and figure out the fix.
Comment #6
sepehr.sadatifar commented@drunken-monkey no module or custom code related to 404. the #2 patch works, I get no error just a page with no result.
Comment #7
sepehr.sadatifar commented#2 patch seems ok and I think should be commited.
Comment #10
dorficus commentedI'm running into the same issue. I'm going to be re-submitting a patch based on #2, but current with the latest version.
Comment #11
dorficus commentedMoving this back to Search API since the issue is coming from the Search API file and the patch I'm uploading is attached to Search API
Comment #12
dorficus commentedComment #13
dorficus commentedComment #15
drunken monkeyOK, since there hasn't been any activity in the issue on the Facet API side, I guess we might as well fix it on our side. (Should probably have done that right away, since it's a fatal error.)
So, thanks for re-rolling, and thanks again for the original patch, kyletaylored!
Committed.
Moving back to the Facet API, since the underlying issue remains.