apachesolr_search_browse is not calling hook_apachesolr_prepare_query, although it does call hook_apachesolr_modify_query. There should be some refactoring to keep the two in sync without having to change code in two places.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 783366.patch | 788 bytes | jpmckinney |
| #13 | 783366-sync-hooks-13.patch | 785 bytes | pwolanin |
| #7 | invoke_hook_apachesolr_prepare_query-783366-7.patch | 2.12 KB | elliotttf |
| #3 | invoke_hook_apachesolr_prepare_query-783366-3.patch | 1.19 KB | elliotttf |
Comments
Comment #1
jpmckinney commentedThis applies only to 6.x-2.x. The other versions don't have apachesolr_search_browse functionality.
Labeled bug report as it is a bug for apachesolr_search_browse not to run hook_apachesolr_prepare_query.
Comment #2
jpmckinney commentedFix in HEAD first.
Comment #3
elliotttf commentedNot sure this is exactly the kind of change you were hoping for (since it's not really refactoring, just adding the functionality), but here's a patch that at least gets hook_apachesolr_prepare_query() in apachesolr_search_browse().
Comment #4
pwolanin commentedminor, but
versus
Looks like the 1st call may be referencing an undefined variable.
Comment #5
elliotttf commentedNot sure I'm following you. $caller is one of the function arguments, if there's a chance that could be undefined shouldn't we set a default value of 'apachesolr'? Or is there something else that might be undefined?
Comment #6
pwolanin commentedok, if it's one of the fucntion arguments, then the latter call shoudl not be hard-coded to 'apachesolr'
Comment #7
elliotttf commentedSorry, I was looking at the wrong part of the code (doh). Here's a fixed patch.
Comment #8
elliotttf commentedUpdating status since I added a new patch.
Comment #9
pwolanin commentedPlease stop using git format-patch
Comment #10
elliotttf commentedSorry, I was following the directions outlined by the git migration team (http://drupal.org/node/1054616). What is the preferred approach? Since your preferred approach is different shouldn't we try to get the git instructions changed?
The documentation does briefly mention git diff but doesn't go into any real detail for using it.
Comment #11
pwolanin commentedWow that doc sucks - that multi-commit formating makes it near impossible to review the patch visually.
Comment #12
pwolanin commentedI have edited the doc to indicated usage of git diff
http://drupal.org/node/1054616
Comment #13
pwolanin commentedI rerolled your multi-commit file above to a single diff
Comment #14
elliotttf commentedThanks, the documentation should probably also be updated on the project git instruction pages (i.e. http://drupal.org/node/204268/git-instructions/master ). I'll make sure to roll patches in the way you suggested in the main git instructions document though.
Comment #15
pwolanin commentedcommitted to master
Comment #16
pwolanin commentedAlso, re: git tab see: #1092226: Fix git tab instructions to suggest using "git diff" instead of "git format-patch"
Comment #17
jpmckinney commentedComment #18
elliotttf commentedLooks good to me.
Comment #19
jpmckinney commented