Using 8.x-3.0-beta1 empty fieldgroups are hidden in forms (as expected), but when I upgrade to the current 8.x-3.x they show.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | field_group-empty-fieldgroups-showing-bug-2986455-2.patch | 901 bytes | chrisolof |
Using 8.x-3.0-beta1 empty fieldgroups are hidden in forms (as expected), but when I upgrade to the current 8.x-3.x they show.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | field_group-empty-fieldgroups-showing-bug-2986455-2.patch | 901 bytes | chrisolof |
Comments
Comment #2
chrisolofSwapped Element::children for Element::getVisibleChildren in field_group_remove_empty_form_groups() and the empties are gone.
Needs review.
Comment #3
alex.bukach commentedWorked like a charm! Thanks @chrisolof!
RTBC+1
Comment #5
nils.destoop commentedThx for the patch, I committed it to dev
Comment #7
w01f commentedJust updating this - using field group 3.x-dev with this patch and empty fieldgroups (from conditions applied via conditional fields) are still showing. Specifically, the tabs for the empty groups are still showing.
I've also attempted using the following patches without success:
Comment #8
liquidcms commentedI have a much newer version of dev: 8.x-3.0-rc2+1-dev (2019-Nov-20) which is still showing empty Fgs (no conditional fields involved): https://www.screencast.com/t/DJN8fI8Wt9AL
FG type is details sidebar
and i have comfimred the 1 line patch is in the code i have:
$children = Element::getVisibleChildren($element);
unfortunately i can't re-open this issue
Comment #9
liquidcms commentedI noticed that my empty FG also had a couple other (empty) FGs inside it. Once i removed those; the parent FG was hidden when empty.
So this should be considered as Needs Work (if anyone has access to change status).
Comment #10
mandclu commentedI'm not able to reopen the issue, so I created #3200703: Empty fieldgroups are showing in forms (updated). FWIW I tried changing the remaining places I could find Element::children in the code to Element::getVisibleChildren (at least where they were part of a conditional statement) but was not able to fix the issue.