Closed (fixed)
Project:
Facet API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Oct 2011 at 06:43 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cpliakas commentedI see the issue here. Good catch! The problem is that this method was added in Facet API beta6. Therefore it had to be backwards compatible with Apache Solr so it didn't break 800 installations. The "apachesolr" module defines the searcher, however it effects the "apachesolr_search' module. Therefore the "_search" was appended to accomodate this. The issue posted at #1294846: Refactoring of the search pages actually overrides this method so it shouldn't be a problem if we remove the "_search" going forward, however any change that is made should be backwards compatible in case someone can't upgrade apachesolr for some reason.
Marking the change as "needs work" because we need to take backwards compatibility with apachesolr <= beta8 into account. It sucks, but the solution here might be to add a conditional to add the "_search" if the
$this->info['module'] == 'apachesolr'. Would love to see a patch from you for this.Thanks for posting,
Chris
Comment #2
cpliakas commentedAdding the "low hanging fruit" tag.
Comment #3
makara commentedPatch attached.
A small follow up. Do you think you should pass arguments with the
module_invoke()? E.g.$this.Comment #4
cpliakas commentedThanks for posting the patch, and it looks good to me.
Regarding passing $this to the search_info() hook, I do like the thought however it assumes that modules are implementing that hook in a non-standard way. I think the approach in the patch has enough flexibility to take care of the common use cases, and modules that implement the adapter should be overriding this method anyways.
Thanks,
Chris
Comment #5
cpliakas commentedCommitted at 362a8a2.
Congrats on becoming the 7th committer to Facet API!
~Chris
Comment #6
makara commentedThanks.
Agreed with #4 about passing $this.
Comment #7
makara commentedBTW. I'm curious. I only submitted a diff. How did you use it as a patch that has me as the author?
Thanks.
Comment #8
cpliakas commentedI just did a
git applythen agit commit --author="makara <makara@132402.no-reply.drupal.org>". If you visit a user's profile page you can see the appropriate --author string that can be used for this purpose.~Chris