Commit: https://git.drupalcode.org/project/field_group/commit/1f05a00
the field_layout module sets #group for elements, after this the field group module don't set own the group.
https://git.drupalcode.org/project/drupal/blob/8.8.x/core/modules/field_...
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | field_groups_not_showing-3095570-6.patch | 1.18 KB | m.lebedev |
| #4 | field_groups_not_showing-3095570-4.patch | 614 bytes | imclean |
Comments
Comment #2
bmustafa commentedI confirm i have the same issue as well on my fresh installation of
i am using field_layout module + display suite
in the edit-form -- the fieldgroups are not rendering
but in the display-mode the fieldgroups are showing okay.
i managed to fix as follows - on line 345 of field_group.module ::
Comment #3
bmustafa commentedjust add this under line 345 of field_group.module:
Comment #4
imclean commentedAfter #3086818: Assigned fieldgroup gets overwitten field groups aren't displaying at all. I don't think the check is the right one here, this should be removed at least.
Comment #5
imclean commentedWithout the patch in #4 it breaks down when the groups are nested.
For example:
Comment #6
bmustafa commentedI would add this note as well:
this solution in #3 and #4 - works for me to render fieldgroups on both
so far, am happy with it.
Comment #7
m.lebedev commentedQuick fix for field layout module
Comment #8
m.lebedev commentedAlso, "needs work" for others modules which changes the form.
Upd:
I looked the ivw_integration module and it seems that the parent issue should be fixed in the ivw_integration module.
Tracking all dependent modules will be difficult.
It will be easier to roll back the commit and solve problems in relevant modules.
Comment #9
shagel commentedwhen i reported the bug
https://www.drupal.org/project/field_group/issues/3086818
i had a solution for the ivw module too using the group_form_process_build_alter hook. But i decided to try to fix this in the field group module.
Unfortunately it seems that the fix influenced other parts of the field group module too.
function ivw_integration_field_group_form_process_build_alter (&$field_group_element, &$group, &$element) {
$entity = \Drupal::routeMatch()->getParameter('node');
if ($entity instanceof \Drupal\node\NodeInterface) {
$has_settings = FALSE;
/*
* Set group of all ivw_integration_settings elements
*/
foreach ($entity->getFieldDefinitions() as $fieldDefinition) {
if ($fieldDefinition->getType() === 'ivw_integration_settings') {
$has_settings = TRUE;
$element[$fieldDefinition->getName()]['#group'] = 'ivw_integration_settings_override';
}
}
}
}
Comment #10
bmustafa commentedPatch number 7 has broken the IEF form - i use inline table - the IEF does not open anymore - so i reverted back to patch#3
Comment #11
imclean commentedFormatted
ivw_integrationfrom #9. Inline comments should use//.This could be something which is fixed in other modules as
field_groupshouldn't need to be aware of them all.I'm not sure what
$has_settingsis used for here.Comment #12
nils.destoop commentedAn option could be that we add a flag that can be set. If that one is set, field group stays of the original #group value. This way, users can still set a #group in the build form part.
Comment #13
imclean commented@zuuperman, I was trying to find something unique within the element/group to check but manually setting a flag could be an easier option.
Would all modules which provide a group need to set it to be compatible with field_group?
Comment #15
nils.destoop commentedI committed the new flag. If you set #field_group_ignore to TRUE, field group will not touch the group value. This should fix all issues and provide other contribs an option to force values.