Importing fields and groups to a content type which a module provides, eg webform etc, after this module has been deactivated and then activated again will result in the group data being lost. Since fieldgroup erases all group related data when the module providing the content type is disabeld, but cck does not remove the fields, content_copy wont try to restore the group data from the import. The patch provided moves a few lines of code around to make content_copy restore group data on the fields even though they exist from before.

Steps to reproduce
* Install drupal 6.10 with cck 2.1 (make sure to enable fieldgroup and content_copy) and webform 6.x-2.4
* Add a cck group to webform and put a field in the group
* Export the node type webform at admin/content/types/export
* Disable webform
* Enable webform
* Import what you exported into the node type webform
* Now both the field and the group you created exist, but the field is not in the group as desired, the group data has been lost.

CommentFileSizeAuthor
content_copy.patch1.43 KBauth
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markus_petrux’s picture

Version: 6.x-2.1 » 6.x-2.4
Assigned: Unassigned » markus_petrux

This is still an issue.

markus_petrux’s picture

Status: Needs review » Fixed

Committed to CVS (branches: CCK2 and CCK3) with inline code comments describing the reason fieldgroup data for fields needs to be updated in both cases (patch).

Thanks! :)

markus_petrux’s picture

Assigned: markus_petrux » Unassigned

Status: Fixed » Closed (fixed)

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

Amir Simantov’s picture

Version: 6.x-2.4 » 6.x-2.5
Status: Closed (fixed) » Active

Why isn't it been fixed in latest release?

See also #537650: Fieldgroup records are lost after upgrade

markus_petrux’s picture

Status: Active » Closed (fixed)

This issue was fixed, committed to CVS, and it is already available in CCK 2.5 release.

If you feel the issue you opened is not related to this, then please re-open the other issue as it could not really be a duplicate of this one. Thanks