Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I assumed that cloning a field group from one display to another would assign the fields to the same groups they were assigned on the source display.
However, all that happens is that the groups get created -- none of the fields get assigned at all.
This makes the clone feature much less helpful than I had anticipated, as I still have to manually rearrange all the fields on the display settings.
Comment | File | Size | Author |
---|
Comments
Comment #1
Stalski CreditAttribution: Stalski commentedAre you cloning from the same content type (view mode to view mode) or from another content type with different fields?
It should be working if the same field_name's are found.
Comment #2
AaronBaumanyes, same node type. from Default to Colorbox modes, using the "Fieldgroups" vertical tab.
i didn't know there was a way to clone across different bundles or entities.
Comment #3
hexblot CreditAttribution: hexblot commentedbumping the issue since it's still there - fields are not currently ( 7.x-1.4 ) being assigned to field groups after being cloned.
Thus, when cloning in the same content type (in my case, I pulled the field groups from the Form into the Display), the fieldsets are correctly cloned (type/metadata are all there), however there are NO fields in them, and the order is semi-random (I assume that if fields where nested, the order might be correct).
I've tried debugging a bit, and found that the actual place where the field children should be set is reset to
array()
- to me, that means there is not possibly way for this assignment to be working as it is.In the attached patch, I've simply commented out that line, and it works just fine both for latest stable ( 7.x-1.4 ) and dev ( 7.x-1.x-dev ). Is this a proper way, or am I missing something that might create issues?
Comment #5
hexblot CreditAttribution: hexblot commentedRerolling the patch with git, hope this time it works
Comment #7
hexblot CreditAttribution: hexblot commentedRe-rolling patch
Comment #8
hexblot CreditAttribution: hexblot commentedComment #9
HunterElliott CreditAttribution: HunterElliott commentedThank you for the patch! I just tried it with Entityform where I had to create different Displays to avoid a bug with file uploads throwing various errors. It worked great - I just created the new Display mode and then cloned the field groups from my Default display and it worked like a charm.
Comment #10
marleo CreditAttribution: marleo commentedThis works with 7.x-1.6 (applied manually.) Thank you!
Comment #11
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 4 year old patch in #7 to field_group.field_ui.inc does not apply to the latest field_group 7.x-1.x-dev and needs a reroll.