Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Entity reference fields are not rendering in their fieldsets. This is occuring on /node/add/... forms for multiple content types. I don't have anything like hooks modifying the form rendering. See attached screencaps for examples.
- Drupal 8.7.6
- Field Groups 3.0 RC1
- Seven admin theme
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Original report by jasonsafro
Comment | File | Size | Author |
---|---|---|---|
#18 | 3075264-18.patch | 3.67 KB | swentel |
#8 | field_group_issue.png | 366.1 KB | anacolautti |
#5 | field-group-error.png | 29.74 KB | redbrickone |
field_groups_bug_02.png | 300.35 KB | JasonSafro | |
field_groups_bug_01.png | 412.34 KB | JasonSafro |
Comments
Comment #2
JasonSafro CreditAttribution: JasonSafro as a volunteer commentedComment #3
jcalais CreditAttribution: jcalais at Siili Solutions commentedCan confirm we have a similar problem, but with any fields, not just references. Even two text fields won't stay inside their field group.
Comment #4
redbrickone CreditAttribution: redbrickone at Code Koalas commentedWe're also experiencing this issue on one of our clients' sites. We are on the latest rc1 version.
Attached is a screenshot. All fields are supposed to be in the details element at top of page but it just hangs open and the fields render below. No errors or whatnot.
Comment #5
redbrickone CreditAttribution: redbrickone at Code Koalas commentedComment #6
redbrickone CreditAttribution: redbrickone at Code Koalas commentedNevermind, this fixes my issue. Update to latest paragraphs and should work!
https://www.drupal.org/project/field_group/issues/3056860
Comment #7
Orestis Nerantzis CreditAttribution: Orestis Nerantzis commentedI have the same problem when updated field group to 3.0-rc1 from 1.0 but for any field. When I retrieve back to 1.0 everything work as expeceted.
Comment #8
anacolautti CreditAttribution: anacolautti commentedI have the same issue. Updated paragraphs and nothing happened.
The form didn't break for me, but the content type's form display did. I can't rearrange anything anymore.
Reverting to 1.0 fixes this for now.
Comment #9
Mike Lewis CreditAttribution: Mike Lewis at Duo is now part of Mediacurrent! commentedI had the same problem that affected sub-groups (e.g.: tabs that are supposed to be grouped into a tab group). It turns out in my case that under Field Group 1.x, the sub-groups had not previously defined the DS region they belonged it (getting that from the parent group). Evidently, 3.x now requires that all groups define the region (?), so the update tried to guess which region to put the sub-groups in (field_group_update_8301) and got it wrong. It put them all in the content region. I have a few content types that use very custom Display Suite layouts that have custom regions they belong in.
In order to fix this, I had to export config, go through my yml files and find every sub-group that got the new region definition and change it to the region I want it to end up in (the parent group's region), then re-import config. It was a bit of a pain, but it worked.
Comment #10
Mike Lewis CreditAttribution: Mike Lewis at Duo is now part of Mediacurrent! commentedAnd now when I made a change to the view mode, it looked fine until I saved and exported config. It moved all my field groups to the "hidden" region. I had to go in and discard a bunch of changes to my commit and re-import to get everything looking right. Very strange. Could this be a bug in DS similar to the one in paragraphs?
Comment #11
Mike Lewis CreditAttribution: Mike Lewis at Duo is now part of Mediacurrent! commentedSo I opened this last night: https://www.drupal.org/project/ds/issues/3082200. My gut still says this is a Field Group problem, but I'm wondering if Display Suite might be throwing a curveball that Field Group isn't expecting.
Comment #12
swentel CreditAttribution: swentel at eps & kaas for Dropsolid, MuseScore commentedMoving to critical - there are a bunch of issues related with drag and drop, assigning, PHP notices (the famous 'undefined index "name") etc. Going to try and fix them all at once here.
Comment #13
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedSo one problem with drag and drop is that if you move a field or a field group outside a group above the group, the parent is not reset.
So this seems more like a core problem. Going to try and figure out whether I can reproduce this with core it self.
Comment #14
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedSo the problem is that the upgrade path should probably take DS into account. In case DS is enabled for a display, the DS third party settings contain the regions where the fields belong in, including the existing field groups. So that would be one way to fix that.
Comment #15
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedI've changed the title to fix the upgrade path in this issue and opened #3085858: Drag and drop acts weird, sometimes not resetting the parent, or even clearing the region value for the drag and drop problem.
Comment #16
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedAdding related issues.
Comment #17
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedThis should fix the update to account for DS regions.
It also moves the update to an update post hook as that's safer to use the API there.
Comment #18
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedFixes a tiny little bug in assigning regions on field ui submit and with DS enabled, and the logic in the post update hook is better too now.
Comment #19
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedRe-categorising as Task. still critical though got get this as right as possible :)
Comment #20
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedAssigning to zuuperman as well to get a last look at this. I think it's fine. If this on is in we can tag rc2 imo, maybe even 1.0?
Comment #21
daniel.nitsche CreditAttribution: daniel.nitsche commentedI'm having the same issue as #8 running:
- Drupal 8.7.6
- field_group 3.0.0-rc1 (with Paragraphs 1.9.0)
The patch in #18 worked for me: it added a `content: region` to every field_group group in every entity_form_display config after running update.php (as expected).
After applying the patch and running update.php, the manage form display screen looks as it did before the update to 3.0.0-rc1 (with fields in their correct groups), and I can save/change the order of fields on the manage form display screen again.
Comment #23
nils.destoop CreditAttribution: nils.destoop as a volunteer and commentedReviewed and committed the fix to dev. Important, make sure you export config after performing the update. Otherwise importing config will just reset it back to the wrong version.