By cfennell on
I'm having a bit of a moment here. I've installed the Solr module, which is fabulous, except that I'm not able to get the search box form action to resolve to the appropriate "page." Somehow, the
?q=search/
is getting chopped off of the action upon submitting the form and I am redirected back to the home page, rather than to the search page. I know that I am missing something very, very basic here. Anyone care to enlighten me?
Here's the code from the module:
$form = array(
'#action' => url('search/' . $type, NULL, NULL, TRUE),
'#attributes' => array('class' => 'search-form'),
'#method' => 'get',
'#base' => 'solr_search_form',
);
$form['module'] = array('#type' => 'value', '#value' => $type);
$form['basic'] = array('#type' => 'item', '#title' => t('Enter your keywords'));
$form['basic']['inline'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
$form['basic']['inline']['t'] = array(
'#type' => 'textfield',
'#title' => '',
'#default_value' => $terms,
'#size' => 40,
'#maxlength' => 255,
);
$form['basic']['inline']['submit'] = array('#type' => 'submit', '#value' => t('search'), '#name' => '');
return $form;
Please let me know if you require any more information to solve this - Thanks!!!
Comments
Clean URLs Fixed It
FYI: I turned on clean URLs and no longer have the redirect problem.