Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2006 at 15:51 UTC
Updated:
4 Jan 2009 at 04:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
morbus iffThis would probably affect any form with these conditions (form block on one page, but not on destination page).
Comment #2
krewemaynard commentedI was having trouble with this in 5.0 RC-1, and I still have the same problem now using the final 5.0 release. If I limit the search module to a specific node, any search will take you to the search module itself, not the results. You have to re-do your search to get it to work.
Comment #3
cburschkaThis is either a block.module or a Forms API issue. I'm tending to the latter, since it applies to any form not present on the page its action refers to.
Something very similar happens if you disable the user login block on some pages.
Very simple, though possibly change-intensive fix: Forms API should detect if a given form ID was submitted and call the appropriate submission handler, even if drupal_get_form() wasn't called on this particular form on the target page.
Comment #4
cburschkaTitle change would also be appropriate. I think this one sums it up.
Comment #5
webchickWow, nice. We're getting this bug on a site where the search block is on the front page, but not on any other pages. When I enter a term, it redirects to just search/node, not search/node/X.
FWIW, this broke in 5.x. 4.7.x behaved fine.
Comment #6
webchickwtf @ forum.module?
Comment #7
chx commentedThis can be fixed by removing code. We do not need to add anything.
Comment #8
snufkin commentedtested, works as it should.
Comment #9
gábor hojtsySo this makes you stay on the same page, which essentially makes all pages showing the block search pages?
Comment #10
gábor hojtsyComment #11
cburschkaTo help clear up a confusion that I felt before testing and examining this more closely:
Removing the #action value does not have any effect on where search results are displayed. A search query consists of two HTTP requests:
1. The user submits the form via POST (first request)
2. The _submit function builds a search query URL ("search/node/[term]").
3. The site redirects the user to this URL (second request)
The #action value controls only the target of the first POST request, invisible to the user. The user still ends up on search/node/[term] once the POST is processed and redirected. I believe that solves the problem quite elegantly...
Comment #12
chx commentedI believe too...
Comment #13
gábor hojtsyThis sounds good, thanks. Committed.
Comment #14
zoo33 commentedSo this bug is also present in Drupal 5 (see comment #5 and #174494). Should this patch be ported?
Comment #15
gábor hojtsyMark for 5.x then.
Comment #16
webchickLooks like this'll fix it. Needs to be ported to 4.7.x as well, from the look of http://drupal.org/node/103909.
Comment #17
webchickAnd here's one for 4.7.x.
Comment #18
webchickSigh. ;) Drupal 6 making me lazy about double-checking my patches. ;)
Comment #19
robertdouglass commentedComment #20
robertdouglass commentedHmm. Now I don't know: is "patch (to be ported)" the right status for this since webchick has already ported the patch? Or was it right with "patch (needs review)"?
Anyway, seems like this deserves some attention from Drumm.
Comment #21
webchickYeah, it's needs review if there's already a port.
Comment #22
drummCommitted to 5.x.
Comment #23
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #24
jody lynnThis fix broke the ability for search to work from 404 pages: http://drupal.org/node/292565#comment-1065064
Comment #25
fmitchell commentedStill not passing the search terms in Drupal 6.6. No $form['#action'] in search.module (Acquia version).
You can test at http://brightplum.hobby-site.com/where2hoop/
Search term 'Ray Meyer'
Comment #27
webchickOops. :( Sorry. :(
Marking this back to closed, since this is being handled over at #292565: Regression: Can't set /user to 403 page (was: login destination is broken)