Exporting a field group with child items seems to work fine into the file, but when importing it produces the following errors and the field group loses it's label in the manage fields view on user account page and the child fields are not under it

Notice: Undefined property: stdClass::$label in field_group_pack() (line 1531 of /Applications/XAMPP/xamppfiles/htdocs/stat/sites/all/modules/contrib/field_group/field_group.module).
Notice: Undefined property: stdClass::$weight in field_group_pack() (line 1532 of /Applications/XAMPP/xamppfiles/htdocs/stat/sites/all/modules/contrib/field_group/field_group.module).
Notice: Undefined property: stdClass::$children in field_group_pack() (line 1533 of /Applications/XAMPP/xamppfiles/htdocs/stat/sites/all/modules/contrib/field_group/field_group.module).

Here's the inc file

<?php
/**
* @file
* field_group.group_user_personal|user|user|form.inc
*/

$api = '2.0.0';

$data = $field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_user_personal|user|user|form';
$field_group->group_name = 'group_user_personal';
$field_group->entity_type = 'user';
$field_group->bundle = 'user';
$field_group->mode = 'form';
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Personal',
'weight' => '3',
'children' => array(
0 => 'field_first_name',
1 => 'field_last_name',
2 => 'field_membership_number',
3 => 'field_user_title',
),
'format_type' => 'fieldset',
'format_settings' => array(
'label' => 'Personal',
'instance_settings' => array(
'required_fields' => 1,
'classes' => '',
'description' => '',
),
'formatter' => 'collapsible',
),
);

$dependencies = array();

$optional = array();

$modules = array(
0 => 'ctools',
1 => 'field_group',
);

CommentFileSizeAuthor
#4 1866842.4.patch2.74 KBGDrupal
#2 1866842.1.patch3.89 KBGDrupal

Comments

GDrupal’s picture

Assigned: Unassigned » GDrupal
GDrupal’s picture

Status: Active » Needs review
StatusFileSize
new3.89 KB

@bjalford Can you give a try to this patch? ;) thanks

GDrupal’s picture

Status: Needs review » Needs work

Wrong patch

GDrupal’s picture

Status: Needs work » Needs review
StatusFileSize
new2.74 KB

@bjalford Can you give a try to this patch? ;) thanks

bjalford’s picture

Status: Needs review » Reviewed & tested by the community

Works well. Thanks!

GDrupal’s picture

Status: Reviewed & tested by the community » Fixed

I will commit as this patch fix the original issue, but there is still an issue detecting the status of the configuration correctly.
committed

Status: Fixed » Closed (fixed)

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