With version 1.5 element id's needs to be re-featurized, a lot of work.

Patch will follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tessa Bakker created an issue. See original summary.

Tess Bakker’s picture

Title: Make field group id's backwards compatible with field_group-7.x-1.4 » Make the element id backwards compatible with field_group-7.x-1.4
Issue summary: View changes
Status: Active » Needs review
FileSize
903 bytes

With this patch, old features can reverted without the lost of the element id.

New or updated features will use the new and better implementation.

Status: Needs review » Needs work

The last submitted patch, 2: make_field_group_id_s-2650806-2.patch, failed testing.

Tess Bakker’s picture

FileSize
3.46 KB

New patch, with changes to the display test.

rudiedirkx’s picture

It's still not as backward compatible as I'd like. Like this, the ID is rendered when creating HTML output, but it's not used when editing the field group, meaning it will be lost when you edit & save an existing (working) field group.

The solution IMO would be to put the id-logic in field_group_unpack(), which is always executed for every fieldset everywhere: rendering AND editing.

Adding this would be enough:

    if (!isset($group->format_settings['instance_settings']['id'])) {
      $group->format_settings['instance_settings']['id'] = $group->entity_type . '_' . $group->bundle . '_' . $group->mode . '_' . $group->group_name;
    }

Patch later.

rudiedirkx’s picture

Category: Feature request » Bug report
Priority: Normal » Major
Status: Needs work » Needs review

Actually there's no way to make it backward compatible, because 1.5 uses drupal_html_id(), which changes _ to -, which breaks existing html ids. Nice.

Let's see if #4 works.

rudiedirkx’s picture

Only php 7 deprecated warnings in ctools.

Chris Matthews’s picture

The 3 year old patch in #4 to field_group.module and field_group.display.test applied cleanly to the latest field_group 7.x-1.x-dev, but still needs review (if still applicable).

Checking patch field_group.module...
Hunk #1 succeeded at 667 (offset -2 lines).
Hunk #2 succeeded at 1044 (offset -2 lines).
Checking patch tests/field_group.display.test...
Applied patch field_group.module cleanly.
Applied patch tests/field_group.display.test cleanly.