Hi,

i run currently in the problem that formatter settings will not be saved. If i understand it right the settings will be saved on

field_group_field_overview_submit

callback but it seems that the settings will be always the defaults (see screenshot) Any idea for me to debug on the right place ?

Screenshot of debug output

thanks
Dennis

CommentFileSizeAuthor
#6 field_group-fix-format-1541272.patch1.34 KBapemantus

Comments

apemantus’s picture

Yes, I've just run into this problem with the latest version. The "Fieldset" widget has "fieldset collapsible" and "required_fields yes" as defaults. If I change them they appear to change (e.g. the ajax callback changes the widget values), but in reality they don't (e.g. reloading the page (or using the actual node form) shows that it's still the defaults)

apemantus’s picture

Umm, sorry. So in my case at least, after actually looking at the code, it does work. It's not enough to just alter the widget, you then need to click Save on the Manage Fields page as well. This may be default Drupal behaviour, but it did throw me.

simon georges’s picture

On my setup, with the latest 1.x-dev, saving the form revert to the default values, on both "Managed fields" and "Manage Display" screens. The AJAX callback is indeed working, but the save doesn't appear to work properly.

Would it be possible there's a conflict with another module?

apemantus’s picture

Umm, double sorry. While it looked like it worked, now that I actually have fields in it, it doesn't. Whatever happens (update and additionally saving the manage fields page) it reverts back to the defaults.

apemantus’s picture

Status: Needs review » Active

OK. This is what I get for not drinking enough coffee.

The reason I thought it was working, was it actually did on an older version of the site. The problem is with the latest dev version.

The problem change is in field_group.field_ui.inc which in field_group_field_ui_overview_form_alter now calls field_group_load_field_group on line 329. This loads up a copy of the group with the original settings, which then seem to be used on the save.

To be honest, I'm not really sure what is/isn't needed.

Just changing 329 from

$group = field_group_load_field_group($group_name, $params->entity_type, $params->bundle, $params->mode);

to

$group_check = field_group_load_field_group($group_name, $params->entity_type, $params->bundle, $params->mode);

(and then using $group_check in the rest of the function) seems to work.

apemantus’s picture

Status: Active » Needs review
StatusFileSize
new1.34 KB

Patch attached

simon georges’s picture

Status: Active » Needs review

Seems to work for me. Thanks !

bojanz’s picture

Status: Needs review » Reviewed & tested by the community

Works for me as well.

barwonhack’s picture

Bravo! ++ #6

Stalski’s picture

Status: Reviewed & tested by the community » Fixed

This has been pushed to git. Thx for the patch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.