Skip to content

Duplicate content when using field group #257

@markabur

Description

@markabur

I recently updated paragraphs and field_group, and now I'm seeing fields that are inside of a field group in a paragraph item printed twice -- once inside of the field group and once outside of the field group.

Here is the display for my paragraphs item:

Image

Here is how it outputs:

Image

Important: this only happens if I have overridden paragraphs-item.tpl.php in my custom theme. The template doesn't need to have any changes, it just needs to exist.

This is coming up now for me because of this recent change in field_group.module:

  // Support for Entity Plus API.
  if (isset($theme_registry['entity_plus'])) {
    $entities[] = 'entity_plus';
  }

If I comment that out, then the fields are not duplicated.

However, there is another fix. I haven't done any tracing to figure out why this works, but the problem also gets fixed If I comment out this line in ParagraphsItemEntityController:

$build['#theme'] = 'paragraphs_item';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions