I get error messages, when I go to "Manage Display" of a content-type that uses fieldgroups. I exported my fieldgroups using the ctools bulk exporter and then included the generated code to my module.

CommentFileSizeAuthor
Bildschirmfoto.png167.95 KBchevron
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Stalski’s picture

Status: Active » Postponed (maintainer needs more info)

Do you still have that problem in latest dev? My guess is that is is fixed now, but I want to be sure. Long time I saw this bug.

chevron’s picture

I still have that in latest dev release.

Stalski’s picture

Do you have any other information that can help us reproduce the problem. I have exports in code too but even there no problem.

chevron’s picture

I think I can reproduce this now. This error occurs when one or more fields are assigned to a group but their label and type attributes are set to hidden programmatically.

Stalski’s picture

ok thx, I'll try it out.

Stalski’s picture

Can you provide your code how you set label and type hidden programmatically? Is this a late form alter or another hook and what's the code? Maybe you could tell me what the reasons are for trying to hide the type or label?
Maybe field group can do something to meet your requirements.

Stalski’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Hmm I tested with code through features and normal export through ctools driven default field group hook and everything works as expected.
I did not test this under rc2 as things have changed a lot for the better. Maybe an upgrade is your solution then, I'll be releasing very soon, like tonight I think :)

chevron’s picture

Hi,
I do that within my *.install file. I wrote two helper functions that create the fields and field instances for my content type module. This is the helper function that creates the field intances including the display settings.

function _tageschronik_installed_instances() {
  $t = get_t();
  return array(
   'tageschronik_xmlid' => array(
      'field_name' => 'tageschronik_xmlid',
      'label' => $t('XML-ID'),
      'description' => $t('The ID of the original annotation file.'),
      'required' => TRUE,
      'type' => 'text',
      'widget' => array(
        'type' => 'text_textfield',
      ), 
      'display' => array(
        'default'   => array('label' => 'inline', 'type' => 'text_plain'),
        'teaser'    => array('label' => 'hidden', 'type' => 'hidden'),
        'full'      => array('label' => 'inline', 'type' => 'text_plain'),
        'faksimile' => array('label' => 'hidden', 'type' => 'hidden'),
      ),
    ),
  );