/**
 * Implements hook_content_migrate_data_record_alter().
 *
 * Tweaks individual records in a field.
 */
function content_migrate_text_data_record_alter(&$record, $field, $instance) {
  $existing_formats = &drupal_static(__FUNCTION__);
  if (empty($existing_formats)) {
    $existing_formats = db_query("SELECT format FROM {filter_format}")->fetchCol();
  }

  switch($field_value['module']) {
    case 'text':
      if (!empty($instance['settings']['text_processing'])) {
        // Adapted from node_update_7006(), to adjust the filter format values 
        // from the old numeric to the new text formats. Ensure we have a valid value.
        if (!in_array($record[$field['field_name'] . '_format'], $existing_formats)) {
          $record[$field['field_name'] . '_format'] = variable_get('filter_default_format', 1);
        }
      }
  }
}

switch($field_value['module']) {

will never be entered because there is NO avaliable value $field_value

CommentFileSizeAuthor
#1 cck-n1351882-1.patch704 bytesDamienMcKenna
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Active » Needs review
colan’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Issue summary: View changes
Status: Needs review » Fixed

Looks like this was fixed over there.

Status: Fixed » Closed (fixed)

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