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.
In the most recent Feature module version, fields are no longer saved as one feature component type, but split in 'field_base' and 'field_instance'. I think field_group_features_export_alter()
needs to be altered so the detection is done based on 'field_instance' instead of 'field', based on some clever feature detection.
Comment | File | Size | Author |
---|---|---|---|
#18 | field_group-features-1966624-18.patch | 1.68 KB | nils.destoop |
#16 | field_group-n1966624-16.patch | 1.09 KB | alexkb |
#13 | featurediff.png | 42.38 KB | jhodgdon |
#10 | field_group-n1966624-10.patch | 1.17 KB | DamienMcKenna |
#9 | field_group.features.inc_.txt | 1.2 KB | killtheliterate |
Comments
Comment #1
Jorrit CreditAttribution: Jorrit commentedHere are patches for -dev and 1.1. This will break compatibility with Features before 2.0-beta2.
Comment #2
DamienMcKennaShouldn't this be backwards compatible?
Comment #3
DamienMcKennaThis should be backwards compatible.
Comment #4
Jorrit CreditAttribution: Jorrit commentedThanks!
Comment #5
Stalski CreditAttribution: Stalski commentedah cool, thx for the patch!
I'll try to make a big patching session at the end of this week. This one is an important one
Comment #6
killtheliterate CreditAttribution: killtheliterate commentedPatch from #1 doesn't seem to be exporting $field_group->data, though it is adding labels now.
Comment #7
DamienMcKenna@killtheliterate: Please review the patch in #3, it supersedes #1.
Comment #8
KarlSheaWorked for me in a previously-broken feature.
Comment #9
killtheliterate CreditAttribution: killtheliterate commentedTried git apply, then patch <
Didn't apply cleanly, but created this file. I'll take a look at this, though can't right now.
Comment #10
DamienMcKennaThis is a reroll of #3 for 7.x-1.x.
Comment #11
DamienMcKennaFYI the same patch applies to both 7.x-1.x and 7.x-2.x.
Comment #12
killtheliterate CreditAttribution: killtheliterate commentedStill not getting anything in field group features exports. Notably, when I run update.php, I encounter the following error:
Notice: Uninitialized string offset: 0 in field_group_unpack() (line 1507 of .../field_group.module)
Comment #13
jhodgdonThis patch is not working for me either. For one thing, it didn't apply. But when I got it to apply, it also didn't fix the Fieldgroup/Features problems I am seeing, which I think are supposed to be fixed by this patch?
The behavior I seeing is exactly the same whether I use Fieldgroup 7.x-1.1, or 7.x-1.x-dev with the patch in #10 (and we're using Features 7.x-2.0-rc1):
- I create a feature that includes a Commerce Product type with some fields and field groups on it.
- I verify that the field groups, fields, and field instances are all present on the Create Features page. (With 1.1 or with the patch, the field groups were added automatically to the Feature when I selected the Product type.)
- After downloading and then enabling the Feature, it shows up on the Features page as Overridden, even though I have just created it.
- Checking the overrides with the Diff module shows that the 'data' element of the field group array is empty in the original, and non-empty in the override (i.e. the override appears to be correct, as it shows the fields the group should have inside it). See attached screen shot.
- If I go to the "re-create" tab, there is no change to the feature when I recreate it. It exports exactly the same every time, with an empty 'data' array.
So I think this should probably be set back to "needs work" but because I am not absolutely sure this patch is supposed to address the issue I outlined here, I have not done so. As far as I can tell, the patch doesn't change the behavior of field groups in Features in any way.
Comment #14
jhodgdonI did some debugging about this problem and added a comment to this issue:
#1619154-59: Fieldgroup exported feature reports as Overridden just after creating the feature
I am not sure what I am seeing and reported here in the previous comment is related to this issue, because I am not seeing that this patch does anything good or bad to the Field Group module's features integration... I'll continue the discussion on that other issue I guess.
Comment #15
alexkb CreditAttribution: alexkb commentedOn the latest -dev version of field_group, I had to manually apply the #10 patch, and when I did, the field groups exported ok, without showing the feature overridden. We're using features 7.x-2.0-rc1.
Comment #16
alexkb CreditAttribution: alexkb commentedRe-rolled patch attached to help.
Comment #17
akalata CreditAttribution: akalata commentedDoesn't seem like this is still RTBC?
Comment #18
nils.destoop CreditAttribution: nils.destoop commentedWhen applying the patch, the fieldgroups where still not auto-detected. A small fix was enough, can someone test?
It also looks like the auto-detect of features is broken, you have to push the refresh button first, before he finds any dependencies.
Comment #20
nils.destoop CreditAttribution: nils.destoop commented#18: field_group-features-1966624-18.patch queued for re-testing.
Comment #22
nils.destoop CreditAttribution: nils.destoop commentedComment #23
nils.destoop CreditAttribution: nils.destoop commentedComment #24
nils.destoop CreditAttribution: nils.destoop commented#18 has been committed to dev