I don't seem to be able to save the parts of the Jquery Update configuration (admin/config/development/jquery_update) that are wrapped in fieldsets.

When I check the database, the changes do appear to have been changed, but they have no effect on the site and they do not appear in the configuration.

Fieldsets are stored as a whole in the database, which would explain why changes have no effect: variable_get() in jquery_update.module and jquery_update.admin.inc cannot find the right entries.

For example, the setting 'Enable jQuery Migrate Plugin' is not stored in a variable called 'jquery_update_jquery_migrate_enable' but instead is stored in an array in a variable called 'jquery_migrate' (the name of the fieldset).

According to this discussion at the API page for the system_settings_form()-function, the problem occurs when you set the #tree attribute for a fieldset to TRUE, as you appear to have done. The result appears to be that the values for fields within the fieldset are treated as a whole rather than as separate values.

(Note that the discussion I link to is for the D6 version of the function, but the findings appear to be still relevant to D7.)

Comments

BrankoC’s picture

Status: Active » Closed (duplicate)

Marking as duplicate of #2494283: Not saving variables.