markus_petrux - great work on the module!
When Block is enabled and used to initiate a search, the results are not returned. A blank form is currently returned instead.
Quick fix: In sphinxsearch.module, comment out lines that hide block as follows:
if ($delta == 'searchbox') {
// Hide block if current page is search.
//if (!sphinxsearch_is_search_path()) {
return array(
'subject' => t('Search'),
'content' => drupal_get_form('sphinxsearch_search_box'),
);
//}
Comments
Comment #1
markus_petrux commentedhmm... but then the block is also displayed on search pages, unless you tweak the block settings to hide per path (not sure, maybe).
I would prefer to find a method where the sphinxsearch module solves this issue by itself, which is why I used the check.
Could you please try this?
That way the form code is invoked, loaded into the page, so the submit handler is there to process the form submission, which is the one that would redirect to search page with correct parameters in place.
Comment #2
markus_petrux commentedComment #3
zeezhao commentedThanks. That works too.
Personally, I am okay with the block showing or not... Just wanted to make sure it displays results in order to avoid having to enter search keys twice. The search that comes with drupal core - at least in drupal 5.7 I'm using - always shows the search block.
Comment #4
markus_petrux commentedHaving the searchbox block in the same search makes little sense, specially when the faceted search block is enabled. That's the main reason I was checking for that.
Anyway, glad it's working. I'll commit and release a new package, 1.2 for Drupal 5, so we can keep the issue as clean as a whistle. :)
Comment #5
markus_petrux commentedFixed in CVS, release 1.2 is on the go. :)
Comment #6
markus_petrux commented