For some reason I have one field group that refuses to be deleted. Below is a screen cast showing the problem. Ignore the dogs battling in the background, they were just showing off.

http://www.screencast-o-matic.com/watch/cXnreZIpr

CommentFileSizeAuthor
#22 enable-groups.png64.87 KBnils.destoop

Comments

joostvdl’s picture

subscribe... same problem here

nils.destoop’s picture

Is it possible for a non-java movie? Don't have the java plugin installed on chrome / firefox :).

bryancasler’s picture

Uploaded the video for you
http://k.min.us/ijhyMe.mp4

nils.destoop’s picture

Can you take a screenshot from your field_group table in the database? Maybe something is wrong there.

bryancasler’s picture

nils.destoop’s picture

Can you delete the row with id 6? Maybe this causes the problem

nils.destoop’s picture

Status: Active » Postponed (maintainer needs more info)
bryancasler’s picture

I'm able to delete it now through drupals interface. Not sure what was causing this. Additionally after deleting it, the row with id 6 is still there.

Stalski’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Strange, but glad it is fixed. I don't know how this 6 without group_name was possible, but it shouldn't.

mstrelan’s picture

Title: Can't delete a field group » Can't delete a field group when it is part of a feature
Status: Closed (cannot reproduce) » Active

Were you using features? I have the same problem, cannot delete fieldgroup if the fieldgroup is part of a feature. I want to delete it and then recreate the feature, but when I hit delete it just resets to whatever was exported in the feature.

kars-t’s picture

I can confirm this behaviour. We couldn't delete a group that was part of a feature. Error message was:

Notice: Undefined property: stdClass::$id in field_group_export_delete() (Line 1062 von /sites/all/modules/contrib/field_group/field_group.module).
wmostrey’s picture

This might be related to #1177652: Features revert causes error.

I have the same issue. A field group can not be deleted if it's part of a feature. There are two cases in which I did manage to delete the field group:

  1. If I try to delete the field group, it remains undeleted until I disabled the feature. Once I disabled the feature and went back to the content type, it was no longer there.
  2. If I disable the feature the field group belongs to, I am able to delete the feature.
Stalski’s picture

Assigned: Unassigned » nils.destoop
nils.destoop’s picture

Status: Active » Fixed

Fieldgroups can now be deleted. When they are exported, they will be disabled with ctools. Disabled items are not shown anymore.

However: a bug is in features at the moment. Features doesn't notice that the feature is overriden, when a group is disabled. Because of this: you can't re-enable them.
I created an issue at the issue queue from features: #1239734: Feature not beïng set to overriden, when a ctools export (fieldgroup) is disabled

Stalski’s picture

Great

Stalski’s picture

Status: Fixed » Needs work

Another bug came up here.
- Create a content type vertical tabs content (or something :p)-
- Create a vertical tab group and two vertical tabs underneath.
- Remove the vertical tabs group.
- Add it again with the same machinename
- It's not showing up anymore.

The reason is that in ctools_export_load_object the group in question is loaded, but it's status is disabled, so it's filtered out.

I will check now if we can add "disabled=0" for each normal creation.

nils.destoop’s picture

Status: Needs work » Needs review

Groups are now default enabled, when they are created.

Stalski’s picture

Status: Needs review » Fixed

Looks good and seems to work.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Stalski’s picture

Status: Closed (fixed) » Needs work

This should probably be reverted.

After a chat on IRC with Berdir, we found that

// Deleted groups
    if (isset($group->disabled) && $group->disabled) {
      continue;
    }

really removes the group, also when it's in code.

The proposition is to do something with the disabled property, the way views does. We could grey them out at the bottom of the fields UI screen so they are not really gone, just disabled while existing in code.

darrenmothersele’s picture

Title: Can't delete a field group when it is part of a feature » Can't restore a programmatically created field group once it's been deleted

After creating a field group programmatically, and then deleting it through the admin interface, there's no way to get this field group back again.

I found I had to comment out this continue in order to get my field group back again:

    // Deleted groups.
    // @TODO remove the code below and add something meaningfull for "disabled" state.
    if (isset($group->disabled) && $group->disabled) {
      //continue;
    }

I now have an issue that if I make changes to the field group in code, they are not reflected in the field group settings shown in the admin interface.

nils.destoop’s picture

Status: Needs work » Fixed
StatusFileSize
new64.87 KB

I just committed new code for re-enabling fieldgroups in code. Once you delete a fieldgroup, that is stored into code. An extra vertical tab will appear, to re-enable the group. Included a screenshot of it.

Stalski’s picture

Great job, that's what we needed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.