I have an entity type with some fields and a fieldgroup, all in a feature.

When I delete a field, the feature notices: 'drush fu' removes it from the feature code.

When I delete a fieldgroup, drush fu has no effect. I have to remove the fieldgroup from the feature by unselecting it in the features admin UI.

Comments

hefox’s picture

Project: Features » Field Group

Going to kick this to field group to see if they have an opinion. I believe features just provides ctools support which field group is using for exportables. Why is field group allowing deletion of stuff that is in code?

milos.kroulik’s picture

I also seem to have this problem. In my case, there are even field groups from deleted content types.

sime’s picture

Status: Active » Closed (outdated)

This issue is over 2 years old, so marking it outdated. Please reopen if this is an ongoing concern, I would consider reviewing further.

ron_s’s picture

Status: Closed (outdated) » Active

This has been an issue forever and continues to be. Whenever a field_group is deleted, it is not removed from the feature. Instead, it marks the field_group as $field_group->disabled = TRUE;

The only way I have found around this is to write custom code that loops through the results of field_group_info_groups, does a comparison with the default_field_group variable, and removes anything from default_field_group which no longer exists.

I actually don't even know where the default_field_group variable gets created or updated... I cannot find any reference to it anywhere in code, either the field_group module or core. It has to be something where its variable name gets concatenated before storage.

ron_s’s picture

One additional bit of advice regarding this issue... a lot of headache can be saved by removing the field group to be deleted from the feature prior to deleting it.

Re-create the feature with the field group removed, such that the feature does not even know the field group exists. Also manually remove the references to features_exclude[field_group|....] that you will find in your feature ".info" file. Then delete the field group, and re-create the feature again.

This is certainly time-consuming to have to do so in multiple steps, but will at least ensure the feature is correct and does not contain the deleted field group.