Download & Extend

Let search_config work without arg(1) == 'node'

Project:Search configuration
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

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

#1

Oops, that wasn't good. Doesn't let search_config kick in when using search 404. Better to remove the arg(1) condition altogether.

#2

Status:active» fixed

I see no immediate harm in doing this. Committed in http://drupal.org/cvs?commit=216036.

#3

Thanks, canen!

#4

Status:fixed» active

dhrgovic,

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.

#5

Version:6.x-1.x-dev» 7.x-1.0-beta1
Category:feature request» bug report

Fixed in D7

#6

Version:7.x-1.0-beta1» 6.x-1.x-dev
nobody click here