Hi,

I am unable to alter the Search Label option, no matter what I submit, it always resets to the default option "Server Files".

Cheers,
Danielle

Comments

schildi’s picture

Assigned: Unassigned » schildi
Status: Active » Fixed

Please check revision 5.x-1.2

dinis’s picture

Cheers for the info, the new release of 5.x-1.2 is somewhat broken though :)

See notes - http://drupal.org/node/358144

Many thanks,
Danielle

remi’s picture

I have the same issue and I'm using version 5.x-1.2. My Drupal site is also using the i18n module and the search_files_label variable has been set as a multilingual variable in the settings.php file.

remi’s picture

Status: Fixed » Needs review

I got it. In the file search_files.module, at line 702, I replace the following:

    '#value' => variable_get('search_files_label', 'Server Files'),

With the line below:

    '#default_value' => variable_get('search_files_label', 'Server Files'),

If I may, I would also like to suggest replacing the entire search_files_settings() with the following, to make it work with string translations:

function search_files_settings() {
  $form = array();
  $form['search_files_label'] = array(
    '#title' => t('Search Label'),
    '#type' => 'textfield',
    '#description' => t('What do you want the Search tab to be labeled?'),
    '#default_value' => variable_get('search_files_label', t('Server Files')),
  );
  return system_settings_form($form);
}

The above is only the same with the "#default_value" fix, except every string is wrapped with t(). I suggest all the strings should be wrapped the same in the module. (So far, all the other strings I saw in the module are wrapped with t() already.)

The site I'm working on is using the search_files module, but also needs to be bilingual. I need to make sure that I can translate all the strings in the module.

remi’s picture

Status: Needs review » Fixed

Oops... The fix above is actually for 5.x-1.1-beta1, which is what I was using. I didn't realise 5.x-1.2 already came out with the bug fixed while I was working on my site.

Please ignore my comments. My apologies for the confusion!

remi’s picture

Status: Fixed » Active

Wait... I just downloaded 5.x-1.2 and code seems to be the same than 5.x-1.1-beta1, with the same issue still happening. Can anyone confirm this?

dinis’s picture

The last time I tried to download 5.x-1.2 it appeared to be a module for Drupal 6 and completely "white screened" Drupal 5, I've added a screen shot in an earlier post where you can see how it looked in the modules list.

Hopefully we'll have a dev response soon :)

Cheers,
Danielle

remi’s picture

I think you're right, Dinis. I didn't look in details, but I noticed 5.x-1.2 was acting strange after a while. The modules page was even complaining about not being able to parse search_files.info. After reading your post earlier today, I simply reverted to 5.x-1.1-beta1 with the patch I mentioned above.

Nevertheless, 5.x-1.1-beta1 and I think 5.x-1.2 do not have the menu label issue fixed.

keesje’s picture

I have exactly this issue with 6.x-1.6.

Thanks.

mgifford’s picture

Yup. Just confirmed this as an issue with the dev version of 6 too.

Doesn't change the tab title, nor does it show that you've tried to change the tab title by showing the updated results in the form.

This probably isn't too hard to fix, but am having a devil of a time getting the basics working as it is.

Mike

jrglasgow’s picture

I have this problem fixed in 6.x-2 now

maverick14’s picture

Version: 5.x-1.1-beta1 » 6.x-1.6

This string is still nog translatable/editable in the latest version of the 6.0 release.

slampy’s picture

I can also confirm that this doesn't work in the latest stable version. Please fix. Thanks!