When on a 404 page, searching using a search box somewhere on the page returns another 404 page instead of search results.
Looks like this is the same issue as on http://drupal.org/node/292565. The same fix works for Apache Solr's apachesolr_search_search_box_form_submit().
Patch against 6.x-1.x-dev. I included the documentation from the fix on http://drupal.org/node/292565 as well.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 649038-10.patch | 1.28 KB | jpmckinney |
| #6 | apachesolr-649038-6.patch | 1.12 KB | slip |
| #1 | apachesolr_search_404.patch | 903 bytes | brunodbo |
Comments
Comment #1
brunodboPatch attached.
Comment #2
robertdouglass commentedSo this patch appears to just be keeping apachesolr in sync with core: http://drupal.org/files/issues/search_404-force-destination.d6_0.patch
Comment #3
slip commentedI'm using 1.0 and cam across this problem/patch and it fixed the problem. Seems to make sense given comment #2.
Comment #4
robertdouglass commentedCan you confirm that this line is really needed? unset($_REQUEST['edit']['destination']);
Our case isn't as general as Drupal core's.
Powered by Dreditor.
Comment #5
robertdouglass commentedComment #6
slip commentedI actually haven't been able to figure out the point of those lines at this point. So if somebody wants to clue me in there I'd be able to answer that question better.
However, I read the thread referenced in the comment and I think I understand all of the issues. I removed those lines and did the d6 version of the testing outlined in comment #115, and everything worked. So, if that's adequate, I'm attaching a patch to today's 6.x-1.x-dev branch with those lines removed for review.
Comment #7
robertdouglass commented#649038 by brunodbo, slip | robertDouglass: Fixed Search not working on 404 page.
Committed to 6.x-2.x, thanks.
Comment #8
geerlingguy commentedSubscribe.
Comment #9
jpmckinney commentedWith regard to
$_REQUEST['edit']['destination'], the docs for drupal_goto explain:Comment #10
jpmckinney commentedUpdated 6-2 with the extra unset(). http://drupal.org/cvs?commit=361748
Fixed in 6-1. http://drupal.org/cvs?commit=361744
I'm a little surprised the current 5-2 search box form is working. According to search_box_form_submit, they keys are in
$form_values[$form_id .'_keys'], but the 5-2 code looks for them in$form_values[$form_id]. Here is the 5-2 patch.Comment #11
jpmckinney commentedFixed the
$form_values[$form_id .'_keys']issue in #708414: Fix incorrect usage of D5 FAPI. Committed the rest to 5-2. http://drupal.org/cvs?commit=361766