Hi,

now there is something strange that I cannot figure out so I beg for your help.

In a custom module I alter three forms: 'taxonomy_form_vocabulary', 'node_type_form' and 'system_site_information_settings'. Instead of a generic hook_form_alter I use hook_form_FORM_ID_alter.

With one single function I then add a custom fieldset with a single field to each of these forms. Let's say the field is called 'module_changefreq_type_xxx'. I also have a custom validate function that fires OK when called. And I have no custom save function.

When saving the above forms the following happens to the {variable} table:

  • When saving 'system_site_information_settings' a new entry for 'module_changefreq_type_xxx' is created with the correct value from the form. This I guess is the wanted behaviour.
  • When saving 'node_type_form' a new entry for 'module_changefreq_type_xxx_news' is created in {variable}. So somewhere the '_news' gets added where 'news' is actually the node type being edited.
  • When saving 'taxonomy_form_vocabulary' nothing is stored is {variable}.

Any idea of what is going on?

BTW the default value is populated from a variable_get(). I read somewhere that in that case Drupal automatically stores the data in the {variable} table. But this would only explain the first of my cases.

Thanks!