Steps to reproduce:
1) Create new field group of any type and save changes.
2) Click gear to edit settings for field group.
3) Change values and click save. Changes appear properly on page.
4) Reload page. Changes are gone, reverted to original values.

The same thing happens if you change the field type after it's been created (from fieldset to vertical tab, for example) - the settings for the new type appear properly via ajax, but are gone again when you refresh the page, leaving the settings for a fieldset attached to a vertical tab.

The code that creates the buttons/fields is in field_group.field_ui.inc, starting at line 181. The log shows the following error messages at the same time as the failed saves (the exact line numbers may be off from a debugging statement or two I put in):
Notice: Undefined index: instance_settings in field_group_formatter_settings_update() (line 416 of /home2/threewestwinds/webapps/drupal/sites/all/modules/field_group/field_group.field_ui.inc).

Notice: Undefined index: settings_edit_form in field_ui_display_overview_multistep_submit() (line 1197 of /home2/threewestwinds/webapps/drupal/modules/field_ui/field_ui.admin.inc).

Notice: Undefined index: default_formatter in field_group_formatter_settings_update() (line 415 of /home2/threewestwinds/webapps/drupal/sites/all/modules/field_group/field_group.field_ui.inc).

That's as far as I got this evening. It's now 1:30AM, so I'll leave this here overnight and pick up again in the morning.

CommentFileSizeAuthor
#4 Before.jpeg11.85 KBthreewestwinds
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nils.destoop’s picture

When you click on "Update" in the widget settings. You still need to push the save button.

What we will do, is show a "* Changes made in this table will not be saved until the form is submitted." message

swentel’s picture

Priority: Major » Normal

@zuuperman No, we don't have todo that, that's a Drupal Core bug in the Field UI / Ajax system. Setting to normal too. Looking for the issue in Drupal Core.

swentel’s picture

Here's the issue from Drupal Core re: ajax bug. #857312: Add a "changes not applied until saved" warning when changing widget/formatter settings

Still leaves the notices maybe.

threewestwinds’s picture

FileSize
11.85 KB

Ok, I can no longer reproduce the "settings not saved" from above. That seems to be fixed in the latest CVS. But I do have an additional related problem, so I'll put it here instead of opening a new issue.

1) Create a new fieldset.
2) Without editing its settings, give it one or more children.
3) Visit the node creation form and receive error messages:

    * Notice: Undefined variable: collapsible in field_group_field_group_pre_render() (line 504 of /home2/threewestwinds/webapps/drupal/sites/all/modules/field_group/field_group.module).
    * Notice: Undefined variable: collapsed in field_group_field_group_pre_render() (line 505 of /home2/threewestwinds/webapps/drupal/sites/all/modules/field_group/field_group.module).
    * Notice: Undefined variable: classes in field_group_field_group_pre_render() (line 507 of /home2/threewestwinds/webapps/drupal/sites/all/modules/field_group/field_group.module).

I don't see why we allow groups to be created with unset $group->format_settings. When we create a new group, let's just save the defaults to the object. This would also solve a related UI bug, demonstrated in the attached image, where the cells of the edit table are not properly created if format_settings is unset.

threewestwinds’s picture

Assigned: threewestwinds » Unassigned

Unassigning (forgot I did that).

Stalski’s picture

Assigned: Unassigned » Stalski

I'll take care of that asap.
Actually the defaults should be saved onto the object while adding a new group. I'll have to check what goes wrong while taking the described steps.

Stalski’s picture

Status: Active » Closed (cannot reproduce)

I tried it and it works now. Maybe something in core fixed it, no idea really.