If there are no groups defined for the content type you want to copy you'll get the following warning:

warning: Invalid argument supplied for foreach() in
*/sites/all/modules/cck/modules/content_copy/content_copy.module on line 193.

because of argument

 $form_values['groups'] 

is a:0:{} is no array

wrapping the loop with

if(is_array($form_values['groups'])){
	    foreach ($form_values['groups'] as $group) {
	      $group_state = array('values' => array('group_name' => $group));
	      drupal_execute('fieldgroup_edit_group_form', $group_state, $content_type, $group, 'edit');
	    }
}

did it.

best,
tarik

Comments

tasc’s picture

but with this quick fix,
you have to highlight and export the groups as well !!

hm...

yched’s picture

Component: General » content_copy.module

file under the new 'content_copy.module' component

KarenS’s picture

Status: Active » Fixed

I get no such error in the current code when exporting and importing a type with no groups, so I assume that yched's recent work-over of Content Copy has fixed things.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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