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

Status:active» needs review

Attaching a patch for #1

AttachmentSize
565232-search_config.patch 785 bytes

#3

Status:needs review» reviewed & tested by the community

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.

AttachmentSize
search_config-565232-6.patch 1.53 KB

#7

Works for me, thank you!

#8

Status:reviewed & tested by the community» fixed

Committed to 6.x branch.

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here