The module adds field_group_build_entity_groups()
as a preprocess function to entity render arrays in the hook_theme_registry_alter()
implementation. Thus, the field_group's hook_field_group_build_pre_render_alter()
implementation can receive an entity render array as $element
and it is passed directly to field_group_remove_empty_display_groups()
, which in some edge cases can replace the received render array with a NULL.
Having NULL instead of an entity render array causes the whole entity to not be rendered, since the next preprocess hook will get NULL instead of a render array and this makes the whole page crash with a fatal error.
There would be a couple solutions to this, but, I think the most elegant one is to pass in the $group_name to nested calls, and only use the $empty_group flag to empty the $elements array when there is a $group_name present.
Comment | File | Size | Author |
---|---|---|---|
#5 | field_group--fix_entity_render-2824838-2.patch | 1.18 KB | SchnWalter |
Comments
Comment #2
SchnWalter CreditAttribution: SchnWalter as a volunteer and commentedComment #3
SchnWalter CreditAttribution: SchnWalter as a volunteer and commentedComment #5
SchnWalter CreditAttribution: SchnWalter as a volunteer and commentedUps, wrong patch.
Comment #6
SchnWalter CreditAttribution: SchnWalter as a volunteer and commentedComment #8
Pete B CreditAttribution: Pete B at Deeson commentedPlease add some steps to reproduce the issue.