Closed (works as designed)
Project:
Search configuration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2009 at 06:02 UTC
Updated:
24 Mar 2012 at 07:52 UTC
When no search terms are present, search_config doesn't kick in.
I just patched search_config's form_alter in my version to let it.
// if (arg(1) == 'node') {
if (arg(0)=='search') {
The reason is that I like to expand the advanced search form when users just hit the search button (code below for anyone interested).
In your helper module's form_alter:
switch ($form_id) {
case 'search_form':
if (!arg(1)) { // if it's only /search and no keywords, expand the advanced search fieldset
$form['advanced']['#collapsed']=FALSE;
}
break;
}
Comments
Comment #1
darkodev commentedOops, that wasn't good. Doesn't let search_config kick in when using search 404. Better to remove the arg(1) condition altogether.
Comment #2
canen commentedI see no immediate harm in doing this. Committed in http://drupal.org/cvs?commit=216036.
Comment #3
darkodev commentedThanks, canen!
Comment #4
canen commenteddhrgovic,
Sorry to disappoint but I will need to revert this since it breaks the search forms on none node search types. See http://drupal.org/node/477802
I'll see if there is another way to easily implement it.
Comment #5
alan d. commentedFixed in D7
Comment #6
alan d. commentedComment #7
alan d. commentedRelated task suggested by canen is closed and the code here is no longer applicable.