Posted by sinasquax on September 1, 2009 at 12:04pm
| Project: | Search configuration |
| Version: | 6.x-1.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hello there is a small bug which disable validation if website is not in english :
on search_config.module at line 285,
replace :
if ($form_state['values']['form_id'] == 'search_admin_settings' && $form_state['values']['op'] == 'Save configuration') {
by :
if ($form_state['values']['form_id'] == 'search_admin_settings' && $form_state['values']['op'] == t('Save configuration')) {
Comments
#1
Also re-index doesn't work:
function search_config_validate($form, &$form_state) {- if ($form_state['values']['form_id'] == 'search_admin_settings' && $form_state['values']['op'] == 'Save configuration') {
+ if ($form_state['values']['form_id'] == 'search_admin_settings' && $form_state['values']['op'] == t('Re-index site')) {
+ drupal_goto('admin/settings/search/wipe');
+ }
+ elseif ($form_state['values']['form_id'] == 'search_admin_settings' && $form_state['values']['op'] == t('Save configuration')) {
$post_values = $form_state['values'];
$node_types = node_get_types('names');
#2
Attaching a patch for #1
#3
I'm going to mark this RTBC, as I've confirmed both of the fixes in dt_brume's solution, and my patch is identical to that.
#4
Patch confirmed works for both problems.
#5
Using drupal_goto could prevent other modules from performing validation. The following patch moves the validation function from hook_search() to hook_form_alter().
search_config-703322.patch
#6
Re-rolling to include the solution from #1.
#7
Works for me, thank you!
#8
Committed to 6.x branch.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.