Closed (fixed)
Project:
Field Group
Version:
8.x-3.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2016 at 11:13 UTC
Updated:
1 Apr 2019 at 22:39 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
danny englanderI can confirm the same issue in Drupal 8.
Comment #3
eme commentedComment #4
jmcoder2 commentedIssue seems for 8, I'm getting it in 7 as well.
I haven't tried field groups in 7 yet though I have read the docs and know the basics of how it's changed - how you only add the names of the fields to the group array instead of putting the field definition arrays inside it, as is the case with fieldsets, and what I remember doing in previous versions of Drupal.
Here, it does appear as if the appropriate FormAPI elements are present, with the fields I moved into the fieldgroup named in a [#group] array. So it appears that trying to insert the code with hook_form_alter() isn't likely to work either.
I haven't yet tried moving the elements into a fieldset with a module. I'll probably try that soon and report back here so people know if that's an option.
Reporting back: Just found a workaround: switching the type of fieldgroup to fieldset yields a fieldset which can either be collapsible or collapsed - and note, this is with the fieldgroup module, and not by fiddling with hook_form_alter() - just hit the little gear and pick fieldset.
Comment #5
amuhlou commentedWorkaround in #4 does not work in Drupal 8.4.2, with Field Group version 8.x-3.0-beta1. The duplicate field is just placed below the fieldset.
Comment #6
_NuMaN commentedI have same issue, is there any solution ?
Comment #7
anybodyPerhaps the reason may be something like this?
Related issue?
Comment #8
p4trizio commentedI dig it a lot and... the best solution I found until this moment is to patch field_group_entity_view_alter
Looks like that hook_entity_view_alter is called multiple time
EDIT: wrong patch sorry
Comment #9
p4trizio commentedComment #10
steinmb commentedIssue getting a little old. Core and this module have moved on. Perhaps we not make sure patches apply against latest dev version?
Comment #11
p4trizio commentedHi Stein, the provided patch solves the problem for me with
- drupal 8.5.4
- field_group 8.x-3.x-dev
- eck 8.x-1.0-alpha3
Changing the title of the issue to "Duplicated fields with field_group on referenced entities" since the problem is visible if you set up a field group on an ECK entity that is referenced by a node: on the node view you see duplicated fields right after the field group.
Comment #12
sim_1I added a screenshot to the description to help illustrate the bug.
The provided patch worked for me as well when I tested with:
- Drupal 8.5.5,
- field_group 8.x-3.0-beta1
- ECK 8.x-1.0-alpha3
Are there other steps needed? For now I'm marking it as RTBC.
Comment #13
simeChanged the title to indicate that this is specific to integration with ECK module.
Comment #14
nils.destoop commentedThe patch is not ok, as it will cause to nest 2 times for all other entity types. The main issue is probably that field_group_theme_registry_alter needs to be updated for eck support. There is code for eck, but it probably needs an update.
Comment #15
nils.destoop commentedThe rendering is working completely, but there is an issue with the default properties of eck (like title). It's correctly grouped, but the element has a 'printed' value set to true. That's the reason why the title is not appearing. All other mentioned issues, are ok for me on latest dev.
Comment #17
nils.destoop commentedIssue should be fixed in dev