Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

My suggestion is to do this using code. IF your using D7, try following code in any custom module or in a basic page.

//Use a query to get all nodes of your particular content type.

$results = db_query("SELECT nid FROM node WHERE type = 'your-content-type'");
$nids = array();
foreach($results as $result){
  $nids[] = $result->nid;
}

foreach($nids as $nid){ // use for loop for testing
  $node = node_load($nid);
  foreach ($node->field_international_activity[LANGUAGE_NONE] as $key => $value) {
   // Build array of field collection values.
   $field_collection_item_values[] = $value['value'];

   // Unset them.  
   unset($node->field_international_activity[LANGUAGE_NONE][$key]);
  }

// Delete field collection items.
entity_delete_multiple('field_collection_item', $field_collection_item_values);
node_save($node);
}

For more details please refer link1link1, link2

This code is not tested, first just try for a single node by using a for loop instead of foreach.

My suggestion is to do this using code. IF your using D7, try following code in any custom module or in a basic page.

//Use a query to get all nodes of your particular content type.

$results = db_query("SELECT nid FROM node WHERE type = 'your-content-type'");
$nids = array();
foreach($results as $result){
  $nids[] = $result->nid;
}

foreach($nids as $nid){ // use for loop for testing
  $node = node_load($nid);
  foreach ($node->field_international_activity[LANGUAGE_NONE] as $key => $value) {
   // Build array of field collection values.
   $field_collection_item_values[] = $value['value'];

   // Unset them.  
   unset($node->field_international_activity[LANGUAGE_NONE][$key]);
  }

// Delete field collection items.
entity_delete_multiple('field_collection_item', $field_collection_item_values);
node_save($node);
}

For more details please refer link1, link2

This code is not tested, first just try for a single node by using a for loop instead of foreach.

My suggestion is to do this using code. IF your using D7, try following code in any custom module or in a basic page.

//Use a query to get all nodes of your particular content type.

$results = db_query("SELECT nid FROM node WHERE type = 'your-content-type'");
$nids = array();
foreach($results as $result){
  $nids[] = $result->nid;
}

foreach($nids as $nid){ // use for loop for testing
  $node = node_load($nid);
  foreach ($node->field_international_activity[LANGUAGE_NONE] as $key => $value) {
   // Build array of field collection values.
   $field_collection_item_values[] = $value['value'];

   // Unset them.  
   unset($node->field_international_activity[LANGUAGE_NONE][$key]);
  }

// Delete field collection items.
entity_delete_multiple('field_collection_item', $field_collection_item_values);
node_save($node);
}

For more details please refer link1, link2

This code is not tested, first just try for a single node by using a for loop instead of foreach.

Source Link
Abin
  • 1.4k
  • 3
  • 11
  • 24

My suggestion is to do this using code. IF your using D7, try following code in any custom module or in a basic page.

//Use a query to get all nodes of your particular content type.

$results = db_query("SELECT nid FROM node WHERE type = 'your-content-type'");
$nids = array();
foreach($results as $result){
  $nids[] = $result->nid;
}

foreach($nids as $nid){ // use for loop for testing
  $node = node_load($nid);
  foreach ($node->field_international_activity[LANGUAGE_NONE] as $key => $value) {
   // Build array of field collection values.
   $field_collection_item_values[] = $value['value'];

   // Unset them.  
   unset($node->field_international_activity[LANGUAGE_NONE][$key]);
  }

// Delete field collection items.
entity_delete_multiple('field_collection_item', $field_collection_item_values);
node_save($node);
}

For more details please refer link1, link2

This code is not tested, first just try for a single node by using a for loop instead of foreach.