If you use the same field on multiple node types (multiple instances of the same field) and that field is in a fieldgroup on multiple node types, when you remove the field instance from any one node type, it will remove the field from fieldgroups in other node types.

To me it appears this is the problem:

In function: fieldgroup_content_fieldapi
SQL: DELETE FROM content_group_fields WHERE field_name = 'field_test_number'

this should be

SQL: DELETE FROM content_group_fields WHERE field_name = 'field_test_number' AND type_name = 'test_node_type'

CommentFileSizeAuthor
#1 cck-374213-1.patch620 bytesrpanna

Comments

rpanna’s picture

Status: Active » Needs review
StatusFileSize
new620 bytes

This is my first patch submitted on drupal so I hope its correct.

yched’s picture

Status: Needs review » Fixed

Nice catch. Committed. Thanks !

Status: Fixed » Closed (fixed)

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