This may be related to #1179292: Fieldsets within vertical tabs don't appear in edit form and #1142612: Nested groups sometimes fails.

I've tried fieldsets within a vertical tab and fieldsets within fieldsets and in both cases, the fields within the nested group display as if the nested group doesn't exist.

I suspect it is in the way the groups are attached and rendered. The code that tries to build the tree of groups using the flat-lists in $element['#groups'] and $element['#group_children'] doesn't seem to work once you have a group within a group.

The functions to look at would probably be:
field_group_attach_groups(), which calls
field_group_build_pre_render(), which calls
field_group_fields_nest()

CommentFileSizeAuthor
#1 field_groups_nesting-1184126-1.patch1.35 KBankur
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ankur’s picture

Status: Active » Needs review
FileSize
1.35 KB

I've found that the attached patch makes my problems go away.

ankur’s picture

I should note that fieldsets within fieldsets work independently of that patch. That must've been fixed in a recent update. However, I needed this patch to fix fieldsets within vertical tabs.

Stalski’s picture

Status: Needs review » Fixed

Thx for the explanation. Some other issues are about fieldsets in fieldsets as well, but I did not realize that only happened with the special "additional_settings" fieldset (vertical tabs in core). I was a bit in the dark there as I was never able to see the same problem.
I was easily able to reproduce the outer and inner so the outer did not appear. The patch you gave fixes it indeed and is a clever solution, although it points out that vertical tabs in core is not very usefull with the current implementation or I don't get it all.

So thx for the patch, it has been pushed to git as it fixes this and some other issues. It also seems the most plausible way to tackle this problem.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

SocialNicheGuru’s picture

has this been committed?