In my installation I have some taxonomy term with some additional fields, and I'm using field_group to display them.
When I'm going to a taxonomy term page and the term has some empty fields I get the following error:
"The website encountered an unexpected error. Please try again later."
In reports I found the following error:
Recoverable fatal error: Argument 1 passed to Drupal\Core\Render\Element::children() must be of the type array, null given, called in /modules/field_group/field_group.module on line 227 and defined in Drupal\Core\Render\Element::children() (line 76 of /core/lib/Drupal/Core/Render/Element.php).
Comment | File | Size | Author |
---|---|---|---|
#9 | fatal_error_if_a_group-2634976-9.patch | 1.14 KB | geerlingguy |
Comments
Comment #2
nils.destoop CreditAttribution: nils.destoop as a volunteer and at Wunder commentedHi, this problem should be fixed in latest dev. The code causing bugs was not needed anymore (left over of d7 functionality), and is now removed.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedI would like to open this issue back up. I am suffering from the same problem with a node display. It seems that if a field group contains fields that don't have any values or content it causes the fatal error quoted in the original post to appear.
In my case, I have a field group (HTML element) added to a custom view mode display. The three fields inside it are empty on X page and the fatal error occurs. If I add a value to at least one of the fields on X page, there is no longer an issue.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAh! After reviewing this issue again, I realize this is indeed resolved on the 8.x-1.x-dev branch. It is still an open issue on 8.x-1.0-rc4. I will close this issue again but let me know if this should be presented as a new issue for the rc4 branch.
Comment #7
sittard CreditAttribution: sittard commentedI'm also getting the same error (copied below) with 8.x-1.0-rc4
Comment #8
Zekvyrin CreditAttribution: Zekvyrin commented@sittard: as hexagoncircle said, it's commited in the latest dev branch.
latest Recommended release (rc4) doesn't contain this fix.
I guess a future rc or stable release will contain it but until then you can use the dev.
Comment #9
geerlingguy CreditAttribution: geerlingguy as a volunteer commentedI'm uploading a patch file for the commit that fixes this issue, mostly so those wanting to build sites with a stable release and just this patch (instead of switching to dev) using composer or drush make can do so more easily. Issue is still fixed, and just awaits a new release of the module.
Comment #10
ressa CreditAttribution: ressa as a volunteer commentedI just tested the patch file posted in #9 and it works perfectly. Thanks for sharing @geerlingguy!
Comment #11
ressa CreditAttribution: ressa as a volunteer commentedPerhaps it is worth considering a new recommended release, to get a patch like this one included?
Comment #12
ressa CreditAttribution: ressa at Ardea commentedA new version of the module has been released, so the patch from #9 is no longer needed.