Closed (won't fix)
Project:
Similar By Terms
Version:
5.x-1.15
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2009 at 17:01 UTC
Updated:
5 Jul 2011 at 00:39 UTC
After installing this module, I went to the settings page at http://example.com/admin/settings/similarterms and changed all the settings to non-defaults and clicked on 'Save configuration'. The settings page showed the values still set to the defaults. Inspecting the variables table showed that the admin settings entries (e.g., similarterms_display_options) were not present.
This worked correctly in release 5.x-1.10.
Comments
Comment #1
rmiddle commentedOps,
That was a mistake. I added a submit function to clear the cache. Get what no longer gets set any more. I will need to fix that.
Thanks
Robert
Comment #2
FVANtom commentedfunction similarterms_admin_settings_submit($form_id, $form_values) {
variable_set('similarterms_vocabularies', $form_values['similarterms_vocabularies']);
variable_set('similarterms_display_options', $form_values['similarterms_display_options']);
variable_set('similarterms_ncount_options', $form_values['similarterms_ncount_options']);
variable_set('similarterms_cache_options', $form_values['similarterms_cache_options']);
if ($form_values['similarterms_clear_cache']) {
cache_clear_all('*', 'cache_similarterms', TRUE);
drupal_set_message(t('Similarterms Block Cache is now cleared'));
}
}
This will fix the problem. Although I'm not sure if we should filter the values for script injections?
Comment #3
ezra-g commented@FVANtom, can you submit this change as a patch so that others can test it?
Thanks!
Comment #4
fat_mike commentedmay I ask you what is this
$form['#submit']['similarterms_admin_settings_submit'] = array();for?I think you can remove this line and replace _submit function with _validate one:
Comment #5
rmiddle commented5.x is no longer supported. Closing it.
Thanks
Robert