i got many trouble with field group + features. features will generate empty array . when we revert features we will lost all field group.
Array to string conversion in field_group_field_group_to_hook_code() (line 2264 of sites/all/modules/contrib/field_group/field_group.module)
I think it is wrong basic code php

$object->$export['key'] it MUST BE $object->{$export['key']}

here is my patch

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lazzyvn created an issue. See original summary.

gremy’s picture

Status: Active » Reviewed & tested by the community

This issue was getting me crazy and this patch is awesome. It fixes the problem.
I tested it on a docker4drupal environment with PHP 7.0.16.

gremy’s picture

I just checked the latest dev version (7.x-1.5+2-dev) and the fix is already committed.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, field_group_features.patch, failed testing.

gremy’s picture

Status: Needs work » Fixed

Created a release request issue: https://www.drupal.org/node/2869084

lazzyvn’s picture

hello @gremy
dont trust version dev i know it fix but version dev take out line 675


  else {
    $element['#id'] = $form['#entity_type'] . '_' . $form['#bundle'] . '_' . $view_mode . '_' . $group->group_name;
  }

i dont know why it has been remove. it create bug with jquery because Id is empty by default

Status: Fixed » Closed (fixed)

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

michaelsoetaert’s picture

maxplus’s picture

Thanks,
I'm using patch #8 to solve this issue for me in losing data in my features export

mdolnik’s picture

FYI this patch is the same as PHP7 - Uniform Variable Syntax updates are causing exported field_groups to not have names. which is now a part of 1.6