I have downloaded 6.x-1.5, tar-ed, installed in Modules interface and I now have Search File config interface.

This interface does not store any changes I make to it.

I have tried to enter "test" in Setting (admin/settings/search_files) in stead of "Server Files". After pressing "Save configuration" button, "Search Files" reappears in the text box but the interface says "The configuration options have been saved.". If I go to Search screen (search/seach_files), I do not see that the tab name has changed and it remains to show "Search Files".

The same behaviour goes with Directories tab (admin/settings/search_files/directories) and Helpers tab (admin/settings/search_files/helpers).

Anyway to debug this? I use the following environment:

PHP: 5.2.0-8+etch10
Postgres: PostgreSQL 8.1.11
Web server: Apache2
OS: Debian 4.0

Browser: Firefox 2.0.0.14 (both LINUX &WIN), IE7

Tables:
I can see following tables (& sequences) which starts with "search_files".

search_files_directories | table
search_files_directories_id_seq | sequence
search_files_files | table
search_files_files_id_seq | sequence
search_files_helpers | table
search_files_helpers_id_seq | sequence

Comments

kotoponus’s picture

Not very helpful, but I though I would give you comprementary screenshots.

kotoponus’s picture

I have removed the module completely and reinstalled it. The saving problem still persists. I would be grateful someone can tell me if I am being stupid and missed anything or if there is any faults in this.

mradcliffe’s picture

Component: User interface » Code
Status: Active » Needs review

There is a bug in hook_settings in this module.

I tested the following change and it saves on a production site for me.

@@ -568,7 +568,7 @@
    '#title' => 'Search Label',
    '#type' => 'textfield',
    '#description' => 'What do you want the Search tab to be labeled?',
-    '#value' => variable_get('search_files_label', 'Server Files'),
+    '#default_value' => variable_get('search_files_label', 'Server Files'),
  );
  return system_settings_form($form);
}
bander2’s picture

mradcliffe, works for me with 5.x too.

Thanks,
Brendan

matt b’s picture

Version: 6.x-1.5 » 6.x-1.6
Status: Needs review » Reviewed & tested by the community

Just ran into this bug on 6.x-1.6

Applied the patch and it fixing the problem.

mradcliffe’s picture

Version: 6.x-1.6 » 6.x-2.x-dev
StatusFileSize
new2.34 KB
new937 bytes

With the discussion on the front page between search_attachments and search_files this bug is no longer in the search_files.

I have created a simple patch for existing 6.x-1.6 users, however since the Drupal 6.x-1 branch has been deleted (?) it probably will never show up officially (? again). I don't think there will be anymore versions of search_files coming out to correct this bug. The bug seems to be fixed in the Drupal 5 branch of this module (dev version).

Additionally, the same bug crops up in both search_attachments and search_directories within the modules/ directory of the 6.x-2 branch. I have supplied a patch for these as well. If you use the #value attribute for forms you will not provide a way to actually save values from user input. It's a rather useless form.

thl’s picture

See http://www.lotterer.net/blog/en/165-drupal-search_filesmodule-118thl1
This bugfix exactly handles the problem described in this thread.

bugfix
configuration of “Search Label” must use #default_value not #value

thl’s picture

Assigned: Unassigned » thl
Status: Reviewed & tested by the community » Fixed
thl’s picture

Status: Fixed » Closed (fixed)