Hi,
By default, the site search box sends its POST to the URL of the current page. That doesn't work on Custom Error pages as they immediately return the set HTML. This patch uses a form_alter hook to post to search/node, allowing the form to work as expected.
I haven't had a chance to test on D6, but I imagine it's a problem there as well.
--Andrew
| Comment | File | Size | Author |
|---|---|---|---|
| correct_search_post.patch | 782 bytes | deviantintegral |
Comments
Comment #1
kbahey commentedThanks.
Applied to 5.x and 6.x.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
Anonymous (not verified) commentedSearch form does not appear to work on 403 / 404 CustomError module pages using Drupal 6.5 and customerror-6.x-1.0. When try to search it simply returns the same 403 or 404 page (patch appears to be in place but not working).
Comment #4
deviantintegral commentedWhile I doubt it's the issue, you really should upgrade to Drupal 6.9 to ensure that you have the latest security patches.
What is the form tag set to for the search form?
Comment #5
deviantintegral commentedComment #6
jhodgdonYou can try this on the drupal.org site. It is broken in 6.9.
a) Visit a non-existent page, like drupal.org/project/abcdefg
b) Try to search for something, by typing a term into the search box and clicking submit. You end up staying on the 404 page.
The reason is that the search block on the page has its action set to the current URL. If the current URL is a 404 page, search doesn't work.
It's a real problem, because when a user gets to a 404 page is specifically when they are very likely to want to search.
Comment #7
deviantintegral commentedThis is still a problem in Drupal 6.10 as well.
Comment #8
wretched sinner - saved by grace commentedDuplicate of #292565: Regression: Can't set /user to 403 page (was: login destination is broken).
Help us test the patch, and it will be backported to 6.x also.