Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

After creating a vertical tab in my installation profile I keep getting these notices:

Notice: Undefined property: stdClass::$collapsible in field_group_pre_render_tab()

and

Notice: Undefined property: stdClass::$collapsed in field_group_pre_render_tab()

Here is the code I use to make a vertical tab in my installation profile:

$verticalTab = new stdClass();
$verticalTab->disabled = FALSE;
$verticalTab->identifier = 'group_attachments|node|foo|form';
$verticalTab->group_name = 'group_attachments';
$verticalTab->entity_type = 'node';
$verticalTab->bundle = 'foo';
$verticalTab->mode = 'form';
$verticalTab->label = 'Attachments';
$verticalTab->children = array( 1 => 'attachment');
$verticalTab->format_type = 'tab';
$verticalTab->weight = '0';

So am I missing something? or has this notice got nothing to do with the vertical tab and do I have to look elsewhere?

Any help to fix this notice would be appreciated.

share|improve this question

1 Answer 1

Normally the collapsed and collapsible properties are used on fieldsets. It looks like field_group is expecting for an undefined property on the vertical tabs object.

You could try adding them to your definition as such:

$verticalTab->collapsible = FALSE;
$verticalTab->collapsed = FALSE;

That should keep the field_group module happy.

share|improve this answer
    
Thanks for your quick response, unfortunately this didn't solve my problem. In my vertical tab I have a 'file upload' field. Once I select an image and press upload, that is the moment the notices appear. Could the attachment field be the problem? –  mparryy Nov 15 '13 at 10:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.