Can't save group settings when using another module that saves extra information, such as display suite or panelizer.

You can create a new field group, but can't drag other fields inside the new field group to make a hierarchy.

To reproduce:
1) Install field_group dev version.
2) Install display_suite.
3) Create a new field_group for a content type in any display mode.
4) Drag another field inside the new field group with table drag.
5) Click save
6) Notice the other field isn't inside the field group

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mas5d2 created an issue. See original summary.

mas5d2’s picture

This looks like it's a problem with the way field_group is saving the display settings for the field_group. field_group_group_save() is being called in field_group_field_overview_submit(). field_group_group_save loads the EntityDisplayInterface, makes changes, and saves it. This works great.

Any module that has a submit handler after field_group does this though, appears to be loading the EntityDisplayInterface from the $form itself, making changes, and saving. Since field_group doesn't use the existing instance of EntityDisplayInterface, but instead loads a new instance, it's not saving it's changes on this current instance that the other submit handlers are working with.

This existing instance is then being saved, which overwrites anything that field_groups has already saved.

mas5d2’s picture

Added $display as an optional parameter to field_group_group_save and updated field_group_field_overview_submit to pass it correctly. This should fix the issue.

mas5d2’s picture

Status: Active » Needs review
artreaktor’s picture

#3 fixed the issue for me. My setup is Display Suit + Field Collection

  • zuuperman committed 2a34628 on 8.x-1.x authored by mas5d2
    Issue #2687185 by mas5d2: Can't save group settings when using another...
nils.destoop’s picture

Status: Needs review » Fixed

Thx for the patch. Tested it and committed to dev.

Status: Fixed » Closed (fixed)

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

Status: Closed (fixed) » Needs work

The last submitted patch, 3: field_group-cant-save-field-group-2687185-10968001-D8.patch, failed testing.

aspilicious’s picture

Status: Needs work » Closed (fixed)