diff --git a/core/modules/field/migration_templates/d6_field_instance.yml b/core/modules/field/migration_templates/d6_field_instance.yml
index 3a413c1..dbead84 100644
--- a/core/modules/field/migration_templates/d6_field_instance.yml
+++ b/core/modules/field/migration_templates/d6_field_instance.yml
@@ -45,14 +45,12 @@ process:
       - widget_type
       - widget_settings
       - global_settings
-
   default_value_callback: ''
   default_value:
     plugin: d6_field_instance_defaults
     source:
       - widget_type
       - widget_settings
-
 destination:
   plugin: entity:field_config
 migration_dependencies:
diff --git a/core/modules/field/migration_templates/d6_field_instance_widget_settings.yml b/core/modules/field/migration_templates/d6_field_instance_widget_settings.yml
index b5f6f6d..d18fc27 100644
--- a/core/modules/field/migration_templates/d6_field_instance_widget_settings.yml
+++ b/core/modules/field/migration_templates/d6_field_instance_widget_settings.yml
@@ -41,22 +41,9 @@ process:
   'options/weight': weight
   'options/type':
     type:
-      plugin: static_map
-      bypass: true
-      source: widget_type
-      map:
-        number: number
-        email_textfield: email_default
-        date_select: datetime_default
-        date_text: datetime_default
-        date_popup: datetime_default
-        imagefield_widget: image_image
-        phone_textfield: telephone_default
-        optionwidgets_onoff: boolean_checkbox
-        optionwidgets_buttons: options_buttons
-        optionwidgets_select: options_select
-        nodereference_select: options_select
-        userreference_select: options_select
+      plugin: field_instance_widget_type
+      source:
+        - widget_type
   'options/settings':
     -
       plugin: field_instance_widget_settings
@@ -64,7 +51,6 @@ process:
         - widget_type
         - widget_settings
   'options/third_party_settings': 'constants/third_party_settings'
-
 destination:
   plugin: component_entity_form_display
 migration_dependencies:
diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
index 82f25b5..3164ce7 100644
--- a/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
+++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
@@ -2,16 +2,56 @@
 
 namespace Drupal\field\Plugin\migrate\process\d6;
 
+use Drupal\Component\Plugin\Exception\PluginNotFoundException;
+use Drupal\Component\Plugin\PluginManagerInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\migrate\MigrateExecutableInterface;
 use Drupal\migrate\ProcessPluginBase;
 use Drupal\migrate\Row;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * @MigrateProcessPlugin(
  *   id = "d6_field_field_settings"
  * )
  */
-class FieldInstanceSettings extends ProcessPluginBase {
+class FieldInstanceSettings extends ProcessPluginBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * The cckfield plugin manager.
+   *
+   * @var \Drupal\Component\Plugin\PluginManagerInterface
+   */
+  protected $fieldPluginManager;
+
+  /**
+   * Constructs a FieldSettings plugin.
+   *
+   * @param array $configuration
+   *   The plugin configuration.
+   * @param string $plugin_id
+   *   The plugin ID.
+   * @param mixed $plugin_definition
+   *   The plugin definition.
+   * @param \Drupal\Component\Plugin\PluginManagerInterface $field_plugin_manager
+   *   The field plugin manager.
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, PluginManagerInterface $field_plugin_manager) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->fieldPluginManager = $field_plugin_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('plugin.manager.migrate.field')
+    );
+  }
 
   /**
    * {@inheritdoc}
@@ -19,6 +59,13 @@ class FieldInstanceSettings extends ProcessPluginBase {
    * Set the field instance defaults.
    */
   public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
+    try {
+      return $this->fieldPluginManager->createInstance($row->getSourceProperty('type'), ['core' => 6])
+        ->transformFieldInstanceSettings($row);
+    }
+    catch (PluginNotFoundException $e) {
+    }
+
     list($widget_type, $widget_settings, $field_settings) = $value;
     $settings = [];
     switch ($widget_type) {
@@ -28,58 +75,8 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
         $settings['prefix'] = $field_settings['prefix'];
         $settings['suffix'] = $field_settings['suffix'];
         break;
-
-      case 'link':
-        // $settings['url'] = $widget_settings['default_value'][0]['url'];
-        // D6 has optional, required, value and none. D8 only has disabled (0)
-        // optional (1) and required (2).
-        $map = ['disabled' => 0, 'optional' => 1, 'required' => 2];
-        $settings['title'] = $map[$field_settings['title']];
-        break;
-
-      case 'filefield_widget':
-        $settings['file_extensions'] = $widget_settings['file_extensions'];
-        $settings['file_directory'] = $widget_settings['file_path'];
-        $settings['description_field'] = $field_settings['description_field'];
-        $settings['max_filesize'] = $this->convertSizeUnit($widget_settings['max_filesize_per_file']);
-        break;
-
-      case 'imagefield_widget':
-        $settings['file_extensions'] = $widget_settings['file_extensions'];
-        $settings['file_directory'] = $widget_settings['file_path'];
-        $settings['max_filesize'] = $this->convertSizeUnit($widget_settings['max_filesize_per_file']);
-        $settings['alt_field'] = $widget_settings['alt'];
-        $settings['alt_field_required'] = $widget_settings['custom_alt'];
-        $settings['title_field'] = $widget_settings['title'];
-        $settings['title_field_required'] = $widget_settings['custom_title'];
-        // With nothing entered for min or max resolution in Drupal 6, zero is
-        // stored. For Drupal 8 this should be an empty string.
-        $settings['max_resolution'] = !empty($widget_settings['max_resolution']) ? $widget_settings['max_resolution'] : '';
-        $settings['min_resolution'] = !empty($widget_settings['min_resolution']) ? $widget_settings['min_resolution'] : '';
-        break;
-
     }
     return $settings;
   }
 
-  /**
-   * Convert file size strings into their D8 format.
-   *
-   * D6 stores file size using a "K" for kilobytes and "M" for megabytes where
-   * as D8 uses "KB" and "MB" respectively.
-   *
-   * @param string $size_string
-   *   The size string, eg 10M
-   *
-   * @return string
-   *   The D8 version of the size string.
-   */
-  protected function convertSizeUnit($size_string) {
-    $size_unit = substr($size_string, strlen($size_string) - 1);
-    if ($size_unit == "M" || $size_unit == "K") {
-      return $size_string . "B";
-    }
-    return $size_string;
-  }
-
 }
diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceWidgetSettings.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceWidgetSettings.php
index 62c9829..16f387a 100644
--- a/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceWidgetSettings.php
+++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceWidgetSettings.php
@@ -55,6 +55,7 @@ public function getSettings($widget_type, $widget_settings) {
       ],
       'email_textfield' => [
         'placeholder' => '',
+        'size' => $size,
       ],
       'link' => [
         'placeholder_url' => '',
diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php
index e8cf7f5..87e9ea2 100644
--- a/core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php
+++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php
@@ -2,9 +2,13 @@
 
 namespace Drupal\field\Plugin\migrate\process\d6;
 
+use Drupal\Component\Plugin\Exception\PluginNotFoundException;
+use Drupal\Component\Plugin\PluginManagerInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\migrate\MigrateExecutableInterface;
 use Drupal\migrate\ProcessPluginBase;
 use Drupal\migrate\Row;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Get the field settings.
@@ -13,12 +17,46 @@
  *   id = "field_settings"
  * )
  */
-class FieldSettings extends ProcessPluginBase {
+class FieldSettings extends ProcessPluginBase implements ContainerFactoryPluginInterface {
 
   /**
-   * {@inheritdoc}
+   * The cckfield plugin manager.
+   *
+   * @var \Drupal\Component\Plugin\PluginManagerInterface
+   */
+  protected $fieldPluginManager;
+
+  /**
+   * Constructs a FieldSettings plugin.
    *
-   * Get the field default/mapped settings.
+   * @param array $configuration
+   *   The plugin configuration.
+   * @param string $plugin_id
+   *   The plugin ID.
+   * @param mixed $plugin_definition
+   *   The plugin definition.
+   * @param \Drupal\Component\Plugin\PluginManagerInterface $field_plugin_manager
+   *   The field plugin manager.
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, PluginManagerInterface $field_plugin_manager) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->fieldPluginManager = $field_plugin_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('plugin.manager.migrate.field')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
    */
   public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
     // To maintain backwards compatibility, ensure that $value contains at least
@@ -26,8 +64,17 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
     if (count($value) == 2) {
       $value[] = NULL;
     }
-    list($field_type, $global_settings, $original_field_type) = $value;
-    return $this->getSettings($field_type, $global_settings, $original_field_type);
+    // list($field_type, $global_settings, $original_field_type) = $value;
+    // return $this->getSettings($field_type, $global_settings, $original_field_type);
+    list($field_type, $global_settings, $source_field_type) = $value;
+
+    try {
+      return $this->fieldPluginManager->createInstance($source_field_type, ['core' => 6])
+        ->transformFieldStorageSettings($row);
+    }
+    catch (PluginNotFoundException $e) {
+      return $this->getSettings($field_type, $global_settings, $source_field_type);
+    }
   }
 
   /**
@@ -44,8 +91,6 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
    *   A valid array of settings.
    */
   public function getSettings($field_type, $global_settings, $original_field_type = NULL) {
-    $max_length = isset($global_settings['max_length']) ? $global_settings['max_length'] : '';
-    $max_length = empty($max_length) ? 255 : $max_length;
     $allowed_values = [];
     if (isset($global_settings['allowed_values'])) {
       $list = explode("\n", $global_settings['allowed_values']);
@@ -67,9 +112,6 @@ public function getSettings($field_type, $global_settings, $original_field_type
     }
 
     $settings = [
-      'text' => [
-        'max_length' => $max_length,
-      ],
       'datetime' => ['datetime_type' => 'datetime'],
       'list_string' => [
         'allowed_values' => $allowed_values,
diff --git a/core/modules/field/src/Plugin/migrate/process/d6/FieldWidgetType.php b/core/modules/field/src/Plugin/migrate/process/d6/FieldWidgetType.php
new file mode 100644
index 0000000..0607778
--- /dev/null
+++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldWidgetType.php
@@ -0,0 +1,96 @@
+<?php
+
+namespace Drupal\field\Plugin\migrate\process\d6;
+
+use Drupal\Component\Plugin\Exception\PluginNotFoundException;
+use Drupal\Component\Plugin\PluginManagerInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\migrate\MigrateExecutableInterface;
+use Drupal\migrate\ProcessPluginBase;
+use Drupal\migrate\Row;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+ * Get the field instance widget type.
+ *
+ * @MigrateProcessPlugin(
+ *   id = "field_instance_widget_type"
+ * )
+ */
+class FieldWidgetType extends ProcessPluginBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * The cckfield plugin manager.
+   *
+   * @var \Drupal\Component\Plugin\PluginManagerInterface
+   */
+  protected $fieldPluginManager;
+
+  /**
+   * Constructs a FieldSettings plugin.
+   *
+   * @param array $configuration
+   *   The plugin configuration.
+   * @param string $plugin_id
+   *   The plugin ID.
+   * @param mixed $plugin_definition
+   *   The plugin definition.
+   * @param \Drupal\Component\Plugin\PluginManagerInterface $field_plugin_manager
+   *   The field plugin manager.
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, PluginManagerInterface $field_plugin_manager) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->fieldPluginManager = $field_plugin_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('plugin.manager.migrate.field')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
+    $source_widget_type = $row->getSourceProperty('widget_type');
+    $source_field_type = $row->getSourceProperty('type');
+
+    try {
+      return $this->fieldPluginManager->createInstance($source_field_type, ['core' => 6])
+        ->transformWidgetType($row);
+    }
+    catch (PluginNotFoundException $e) {
+      return $this->getWidget($source_widget_type);
+    }
+  }
+
+  /**
+   * Returns widget for a given source widget type.
+   *
+   * @param $source_widget_type
+   *
+   * @return string|null
+   */
+  protected function getWidget($source_widget_type) {
+    $map = [
+      'number' => 'number',
+      'email_textfield' => 'email_default',
+      'date_select' => 'datetime_default',
+      'date_text' => 'datetime_default',
+      'imagefield_widget' => 'image_image',
+      'phone_textfield' => 'telephone_default',
+      'optionwidgets_onoff' => 'boolean_checkbox',
+      'optionwidgets_buttons' => 'options_buttons',
+      'optionwidgets_select' => 'options_select',
+    ];
+    return isset($map[$source_widget_type]) ? $map[$source_widget_type] : NULL;
+  }
+
+}
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
index 6c4e29c..c2beda0 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceTest.php
@@ -102,6 +102,55 @@ public function testFieldInstanceMigration() {
     $this->assertIdentical('https://www.drupal.org', $entity->field_test_link->url, 'Field field_test_link default title is correct.');
     $this->assertIdentical([], $entity->field_test_link->options['attributes']);
 
+    // Test node reference to entity reference migration.
+    $field = FieldConfig::load('node.story.field_node_reference');
+    $this->assertSame('Node reference', $field->label());
+    $this->assertSame('default:node', $field->getSetting('handler'));
+    $expected = [
+      'target_bundles' => []
+    ];
+    $this->assertSame($expected, $field->getSetting('handler_settings'));
+
+    // Test node reference to entity reference migration.
+    $field = FieldConfig::load('node.story.field_node_reference_2');
+    $this->assertSame('Node reference 2', $field->label());
+    $this->assertSame('default:node', $field->getSetting('handler'));
+    $expected = [
+      'target_bundles' => [
+        'article' => 'article',
+      ],
+    ];
+    $this->assertSame($expected, $field->getSetting('handler_settings'));
+
+    // Test user reference to entity reference migration.
+    $field = FieldConfig::load('node.story.field_user_reference');
+    $this->assertSame('User reference', $field->label());
+    $this->assertSame('default:user', $field->getSetting('handler'));
+    $expected = [
+      'include_anonymous' => FALSE,
+      'filter' => [
+        'type' => '_none'
+      ],
+      'target_bundles' => NULL,
+    ];
+    $this->assertSame($expected, $field->getSetting('handler_settings'));
+
+    // Test user reference to entity reference migration.
+    $field = FieldConfig::load('node.story.field_user_reference_2');
+    $this->assertSame('User reference 2', $field->label());
+    $this->assertSame('default:user', $field->getSetting('handler'));
+    $expected = [
+      'include_anonymous' => FALSE,
+      'filter' => [
+        'type' => 'role',
+        'role' => [
+          'migrate_test_role_1' => 'migrate_test_role_1'
+        ],
+      ],
+      'target_bundles' => NULL,
+    ];
+    $this->assertSame($expected, $field->getSetting('handler_settings'));
+
     // Test date field.
     $field = FieldConfig::load('node.story.field_test_date');
     $this->assertInstanceOf(FieldConfig::class, $field);
@@ -146,7 +195,7 @@ public function testFieldInstanceMigration() {
     $this->assertSame('entity_reference', $field->getType());
     $this->assertSame('Company', $field->label());
     $this->assertSame('default:node', $field->getSetting('handler'));
-    $this->assertSame([], $field->getSetting('handler_settings'));
+    $this->assertSame(['target_bundles' => ['company' => 'company']], $field->getSetting('handler_settings'));
     $this->assertSame('node', $field->getSetting('target_type'));
     $this->assertSame([], $field->getDefaultValueLiteral());
     $this->assertTrue($field->isTranslatable());
@@ -157,7 +206,15 @@ public function testFieldInstanceMigration() {
     $this->assertSame('entity_reference', $field->getType());
     $this->assertSame('Commanding Officer', $field->label());
     $this->assertSame('default:user', $field->getSetting('handler'));
-    $this->assertSame([], $field->getSetting('handler_settings'));
+    $expected = [
+      'include_anonymous' => FALSE,
+      'filter' => [
+        'type' => 'role',
+        'role' => ['authenticated' => 'authenticated',],
+      ],
+      'target_bundles' => NULL,
+    ];
+    $this->assertSame($expected, $field->getSetting('handler_settings'));
     $this->assertSame('user', $field->getSetting('target_type'));
     $this->assertSame([], $field->getDefaultValueLiteral());
     $this->assertTrue($field->isTranslatable());
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
index 6173a3a..45fb98f 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
@@ -114,6 +114,16 @@ public function testFields() {
     $this->assertSame('entity_reference', $field_storage->getType());
     $this->assertSame('user', $field_storage->getSetting('target_type'));
 
+    // Node reference to entity reference migration.
+    $field_storage = FieldStorageConfig::load('node.field_node_reference');
+    $this->assertIdentical('entity_reference', $field_storage->getType());
+    $this->assertIdentical('node', $field_storage->getSetting('target_type'));
+
+    // User reference to entity reference migration.
+    $field_storage = FieldStorageConfig::load('node.field_user_reference');
+    $this->assertIdentical('entity_reference', $field_storage->getType());
+    $this->assertIdentical('user', $field_storage->getSetting('target_type'));
+
     // Validate that the source count and processed count match up.
     /** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
     $migration = $this->getMigration('d6_field');
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
index 6e8e040..23c4dbc 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldWidgetSettingsTest.php
@@ -43,21 +43,29 @@ public function testWidgetSettings() {
 
     // Integer field.
     $component = $form_display->getComponent('field_test_two');
-    $expected['type'] = 'number';
+    $expected = [];
     $expected['weight'] = 1;
+    $expected['type'] = 'number';
     $expected['settings'] = ['placeholder' => ''];
+    $expected['third_party_settings'] = [];
     $this->assertIdentical($expected, $component);
 
     // Float field.
     $component = $form_display->getComponent('field_test_three');
+    $expected = [];
     $expected['weight'] = 2;
+    $expected['type'] = 'number';
+    $expected['settings'] = ['placeholder' => ''];
+    $expected['third_party_settings'] = [];
     $this->assertIdentical($expected, $component);
 
     // Email field.
     $component = $form_display->getComponent('field_test_email');
-    $expected['type'] = 'email_default';
+    $expected = [];
     $expected['weight'] = 6;
+    $expected['type'] = 'email_default';
     $expected['settings'] = ['placeholder' => '', 'size' => 60];
+    $expected['third_party_settings'] = [];
     $this->assertIdentical($expected, $component);
 
     // Link field.
@@ -68,38 +76,54 @@ public function testWidgetSettings() {
 
     // File field.
     $component = $form_display->getComponent('field_test_filefield');
-    $expected['type'] = 'file_generic';
+    $expected = [];
     $expected['weight'] = 8;
+    $expected['type'] = 'file_generic';
     $expected['settings'] = ['progress_indicator' => 'bar'];
+    $expected['third_party_settings'] = [];
     $this->assertIdentical($expected, $component);
 
     // Image field.
     $component = $form_display->getComponent('field_test_imagefield');
-    $expected['type'] = 'image_image';
+    $expected = [];
     $expected['weight'] = 9;
     $expected['settings'] = ['progress_indicator' => 'bar', 'preview_image_style' => 'thumbnail'];
+    $expected['third_party_settings'] = [];
+    $expected['type'] = 'image_image';
     $this->assertIdentical($expected, $component);
 
     // Phone field.
     $component = $form_display->getComponent('field_test_phone');
-    $expected['type'] = 'telephone_default';
+    $expected = [];
     $expected['weight'] = 13;
+    $expected['type'] = 'telephone_default';
     $expected['settings'] = ['placeholder' => ''];
+    $expected['third_party_settings'] = [];
     $this->assertIdentical($expected, $component);
 
     // Date fields.
     $component = $form_display->getComponent('field_test_date');
-    $expected['type'] = 'datetime_default';
+    $expected = [];
     $expected['weight'] = 10;
+    $expected['type'] = 'datetime_default';
     $expected['settings'] = [];
+    $expected['third_party_settings'] = [];
     $this->assertIdentical($expected, $component);
 
     $component = $form_display->getComponent('field_test_datestamp');
+    $expected = [];
     $expected['weight'] = 11;
+    $expected['type'] = 'datetime_default';
+    $expected['settings'] = [];
+    $expected['third_party_settings'] = [];
     $this->assertIdentical($expected, $component);
 
     $component = $form_display->getComponent('field_test_datetime');
+    $expected = [];
     $expected['weight'] = 12;
+    $expected['type'] = 'datetime_default';
+    $expected['settings'] = [];
+    $expected['third_party_settings'] = [];
     $this->assertIdentical($expected, $component);
 
     $component = entity_get_form_display('node', 'employee', 'default')
diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php
index 9a5c483..7c607dd 100644
--- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php
+++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php
@@ -2,9 +2,11 @@
 
 namespace Drupal\Tests\field\Unit\Plugin\migrate\process\d6;
 
+use Drupal\Component\Plugin\Exception\PluginNotFoundException;
 use Drupal\field\Plugin\migrate\process\d6\FieldSettings;
 use Drupal\migrate\Plugin\MigrationInterface;
 use Drupal\migrate\MigrateExecutableInterface;
+use Drupal\migrate\Plugin\MigratePluginManager;
 use Drupal\migrate\Row;
 use Drupal\Tests\UnitTestCase;
 
@@ -19,16 +21,22 @@ class FieldSettingsTest extends UnitTestCase {
    *
    * @dataProvider getSettingsProvider
    */
-  public function testGetSettings($field_type, $field_settings, $allowed_values) {
-    $migration = $this->getMock(MigrationInterface::class);
-    $plugin = new FieldSettings([], 'd6_field_settings', [], $migration);
+  public function testGetSettings($field_type, $field_settings, $source_field_type, $allowed_values) {
+    $cck_plugin_manager = $this->getMockBuilder(MigratePluginManager::class)
+      ->disableOriginalConstructor()
+      ->getMock();
+
+    $cck_plugin_manager->method('createInstance')
+      ->willThrowException(new PluginNotFoundException($source_field_type));
+
+    $plugin = new FieldSettings([], 'd6_field_settings', [], $cck_plugin_manager);
 
     $executable = $this->getMock(MigrateExecutableInterface::class);
     $row = $this->getMockBuilder(Row::class)
       ->disableOriginalConstructor()
       ->getMock();
 
-    $result = $plugin->transform([$field_type, $field_settings, NULL], $executable, $row, 'foo');
+    $result = $plugin->transform([$field_type, $field_settings, $source_field_type], $executable, $row, 'foo');
     $this->assertSame($allowed_values, $result['allowed_values']);
   }
 
@@ -40,6 +48,7 @@ public function getSettingsProvider() {
       [
         'list_integer',
         ['allowed_values' => "1|One\n2|Two\n3"],
+        'list_integer',
         [
           '1' => 'One',
           '2' => 'Two',
@@ -49,16 +58,19 @@ public function getSettingsProvider() {
       [
         'list_string',
         ['allowed_values' => NULL],
+        'list_integer',
         [],
       ],
       [
         'list_float',
         ['allowed_values' => ""],
+        'list_integer',
         [],
       ],
       [
         'boolean',
         [],
+        'boolean',
         [],
       ],
     ];
diff --git a/core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php b/core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php
index 373d1e9..7ed213e 100644
--- a/core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php
+++ b/core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php
@@ -62,4 +62,60 @@ public function getFieldType(Row $row) {
     return $row->getSourceProperty('widget_type') == 'imagefield_widget' ? 'image' : 'file';
   }
 
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldInstanceSettings(Row $row) {
+    $widget_type = $row->getSourceProperty('widget_type');
+    $widget_settings = $row->getSourceProperty('widget_settings');
+    $field_settings = $row->getSourceProperty('global_settings');
+    $settings = [];
+
+    switch ($widget_type) {
+      case 'filefield_widget':
+        $settings['file_extensions'] = $widget_settings['file_extensions'];
+        $settings['file_directory'] = $widget_settings['file_path'];
+        $settings['description_field'] = $field_settings['description_field'];
+        $settings['max_filesize'] = $this->convertSizeUnit($widget_settings['max_filesize_per_file']);
+        break;
+
+      case 'imagefield_widget':
+        $settings['file_extensions'] = $widget_settings['file_extensions'];
+        $settings['file_directory'] = $widget_settings['file_path'];
+        $settings['max_filesize'] = $this->convertSizeUnit($widget_settings['max_filesize_per_file']);
+        $settings['alt_field'] = $widget_settings['alt'];
+        $settings['alt_field_required'] = $widget_settings['custom_alt'];
+        $settings['title_field'] = $widget_settings['title'];
+        $settings['title_field_required'] = $widget_settings['custom_title'];
+        // With nothing entered for min or max resolution in Drupal 6, zero is
+        // stored. For Drupal 8 this should be an empty string.
+        $settings['max_resolution'] = !empty($widget_settings['max_resolution']) ? $widget_settings['max_resolution'] : '';
+        $settings['min_resolution'] = !empty($widget_settings['min_resolution']) ? $widget_settings['min_resolution'] : '';
+        break;
+    }
+
+    return $settings;
+  }
+
+  /**
+   * Convert file size strings into their D8 format.
+   *
+   * D6 stores file size using a "K" for kilobytes and "M" for megabytes where
+   * as D8 uses "KB" and "MB" respectively.
+   *
+   * @param string $size_string
+   *   The size string, e.g. 10M
+   *
+   * @return string
+   *   The D8 version of the size string.
+   */
+  protected function convertSizeUnit($size_string) {
+    $size_unit = substr($size_string, strlen($size_string) - 1);
+    if ($size_unit == "M" || $size_unit == "K") {
+      return $size_string . "B";
+    }
+    return $size_string;
+  }
+
 }
diff --git a/core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php b/core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php
index 9d184ff..e7a2e1a 100644
--- a/core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php
+++ b/core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php
@@ -67,4 +67,57 @@ public function getFieldType(Row $row) {
     return $row->getSourceProperty('widget_type') == 'imagefield_widget' ? 'image' : 'file';
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldInstanceSettings(Row $row) {
+    $widget_type = $row->getSourceProperty('widget_type');
+    $widget_settings = $row->getSourceProperty('widget_settings');
+    $field_settings = $row->getSourceProperty('global_settings');
+    $settings = [];
+
+    switch ($widget_type) {
+      case 'filefield_widget':
+        $settings['file_extensions'] = $widget_settings['file_extensions'];
+        $settings['file_directory'] = $widget_settings['file_path'];
+        $settings['description_field'] = $field_settings['description_field'];
+        $settings['max_filesize'] = $this->convertSizeUnit($widget_settings['max_filesize_per_file']);
+        break;
+
+      case 'imagefield_widget':
+        $settings['file_extensions'] = $widget_settings['file_extensions'];
+        $settings['file_directory'] = 'public://';
+        $settings['max_filesize'] = $this->convertSizeUnit($widget_settings['max_filesize_per_file']);
+        $settings['alt_field'] = $widget_settings['alt'];
+        $settings['alt_field_required'] = $widget_settings['custom_alt'];
+        $settings['title_field'] = $widget_settings['title'];
+        $settings['title_field_required'] = $widget_settings['custom_title'];
+        $settings['max_resolution'] = $widget_settings['max_resolution'];
+        $settings['min_resolution'] = $widget_settings['min_resolution'];
+        break;
+    }
+
+    return $settings;
+  }
+
+  /**
+   * Convert file size strings into their D8 format.
+   *
+   * D6 stores file size using a "K" for kilobytes and "M" for megabytes where
+   * as D8 uses "KB" and "MB" respectively.
+   *
+   * @param string $size_string
+   *   The size string, e.g. 10M
+   *
+   * @return string
+   *   The D8 version of the size string.
+   */
+  protected function convertSizeUnit($size_string) {
+    $size_unit = substr($size_string, strlen($size_string) - 1);
+    if ($size_unit == "M" || $size_unit == "K") {
+      return $size_string . "B";
+    }
+    return $size_string;
+  }
+
 }
diff --git a/core/modules/file/src/Plugin/migrate/field/d6/FileField.php b/core/modules/file/src/Plugin/migrate/field/d6/FileField.php
index 930c13b..57ee74d 100644
--- a/core/modules/file/src/Plugin/migrate/field/d6/FileField.php
+++ b/core/modules/file/src/Plugin/migrate/field/d6/FileField.php
@@ -55,4 +55,59 @@ public function getFieldType(Row $row) {
     return $row->getSourceProperty('widget_type') == 'imagefield_widget' ? 'image' : 'file';
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldInstanceSettings(Row $row) {
+    $widget_type = $row->getSourceProperty('widget_type');
+    $widget_settings = $row->getSourceProperty('widget_settings');
+    $field_settings = $row->getSourceProperty('global_settings');
+    $settings = [];
+
+    switch ($widget_type) {
+      case 'filefield_widget':
+        $settings['file_extensions'] = $widget_settings['file_extensions'];
+        $settings['file_directory'] = $widget_settings['file_path'];
+        $settings['description_field'] = $field_settings['description_field'];
+        $settings['max_filesize'] = $this->convertSizeUnit($widget_settings['max_filesize_per_file']);
+        break;
+
+      case 'imagefield_widget':
+        $settings['file_extensions'] = $widget_settings['file_extensions'];
+        $settings['file_directory'] = $widget_settings['file_path'];
+        $settings['max_filesize'] = $this->convertSizeUnit($widget_settings['max_filesize_per_file']);
+        $settings['alt_field'] = $widget_settings['alt'];
+        $settings['alt_field_required'] = $widget_settings['custom_alt'];
+        $settings['title_field'] = $widget_settings['title'];
+        $settings['title_field_required'] = $widget_settings['custom_title'];
+        // With nothing entered for min or max resolution in Drupal 6, zero is
+        // stored. For Drupal 8 this should be an empty string.
+        $settings['max_resolution'] = !empty($widget_settings['max_resolution']) ? $widget_settings['max_resolution'] : '';
+        $settings['min_resolution'] = !empty($widget_settings['min_resolution']) ? $widget_settings['min_resolution'] : '';
+        break;
+    }
+
+    return $settings;
+  }
+
+  /**
+   * Convert file size strings into their D8 format.
+   *
+   * D6 stores file size using a "K" for kilobytes and "M" for megabytes where
+   * as D8 uses "KB" and "MB" respectively.
+   *
+   * @param string $size_string
+   *   The size string, e.g. 10M
+   *
+   * @return string
+   *   The D8 version of the size string.
+   */
+  protected function convertSizeUnit($size_string) {
+    $size_unit = substr($size_string, strlen($size_string) - 1);
+    if ($size_unit == "M" || $size_unit == "K") {
+      return $size_string . "B";
+    }
+    return $size_string;
+  }
+
 }
diff --git a/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php b/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php
index 0d03656..2aa1b55 100644
--- a/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php
+++ b/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php
@@ -3,6 +3,7 @@
 namespace Drupal\link\Plugin\migrate\field\d6;
 
 use Drupal\migrate\Plugin\MigrationInterface;
+use Drupal\migrate\Row;
 use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
 
 /**
@@ -45,4 +46,24 @@ public function processFieldValues(MigrationInterface $migration, $field_name, $
     $migration->mergeProcessOfProperty($field_name, $process);
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldInstanceSettings(Row $row) {
+    $field_settings = $row->getSourceProperty('global_settings');
+    if (isset($field_settings['title'])) {
+      // D6 has optional, required, value and none. D8 only has disabled
+      // (DRUPAL_DISABLED), optional (DRUPAL_OPTIONAL) and required
+      // (DRUPAL_REQUIRED).
+      $map = ['disabled' => DRUPAL_DISABLED, 'optional' => DRUPAL_OPTIONAL, 'required' => DRUPAL_REQUIRED];
+      $settings['title'] = $map[$field_settings['title']];
+    }
+    else {
+      // In case we are missing title in field settings, use disabled value
+      // "DRUPAL_DISABLED" as a default value.
+      $settings['title'] = DRUPAL_DISABLED;
+    }
+    return $settings;
+  }
+
 }
diff --git a/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php
index 6dceeab..6f9eba1 100644
--- a/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php
+++ b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php
@@ -28,4 +28,32 @@
    */
   public function processCckFieldValues(MigrationInterface $migration, $field_name, $data);
 
+  /**
+   * Apply any custom transformation to the field storage settings.
+   *
+   * @param \Drupal\migrate\Row $row
+   *   The field being migrated.
+   *
+   * @return array
+   *   The destination storage settings.
+   *
+   * @see Drupal\field\Plugin\migrate\process\d6\FieldSettings::transform
+   * @see Drupal\migrate\Plugin\MigrateProcessInterface::transform
+   */
+  public function transformFieldStorageSettings(Row $row);
+
+  /**
+   * Apply any custom transformation to the field instance settings.
+   *
+   * @param \Drupal\migrate\Row $row
+   *   The field being migrated.
+   *
+   * @return array
+   *   The destination instance settings.
+   *
+   * @see Drupal\field\Plugin\migrate\process\d6\FieldInstanceSettings::transform
+   * @see Drupal\migrate\Plugin\MigrateProcessInterface::transform
+   */
+  public function transformFieldInstanceSettings(Row $row);
+
 }
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php
index 027276c..79e58d1 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php
@@ -98,4 +98,27 @@ public function getFieldType(Row $row) {
     }
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldStorageSettings(Row $row) {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldInstanceSettings(Row $row) {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transformWidgetType(Row $row) {
+    $source_widget_type = $row->getSourceProperty('widget_type');
+    $map = $this->getFieldWidgetMap();
+    return isset($map[$source_widget_type]) ? $map[$source_widget_type] : NULL;
+  }
+
 }
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php
index 1579afa..53ce65e 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php
@@ -3,6 +3,7 @@
 namespace Drupal\migrate_drupal\Plugin\migrate\field;
 
 use Drupal\migrate\Plugin\MigrationInterface;
+use Drupal\migrate\Row;
 
 /**
  * @MigrateField(
@@ -13,7 +14,40 @@
  *   },
  * )
  */
-class NodeReference extends FieldPluginBase {
+class NodeReference extends ReferenceBase {
+
+  /**
+   * The plugin ID for the node type migration.
+   *
+   * @var string
+   */
+  protected $nodeTypeMigration = 'd6_node_type';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function entityId() {
+    return 'nid';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldStorageSettings(Row $row) {
+    $settings['target_type'] = 'node';
+    return $settings;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function processFieldInstance(MigrationInterface $migration) {
+    parent::processFieldInstance($migration);
+
+    $migration_dependencies = $migration->get('migration_dependencies');
+    $migration_dependencies['required'][] = $this->nodeTypeMigration;
+    $migration->set('migration_dependencies', $migration_dependencies);
+  }
 
   /**
    * {@inheritdoc}
@@ -33,4 +67,21 @@ public function processFieldValues(MigrationInterface $migration, $field_name, $
     $migration->setProcessOfProperty($field_name, $process);
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldInstanceSettings(Row $row) {
+    $source_settings = $row->getSourceProperty('global_settings');
+    $settings['handler'] = 'default:node';
+    $settings['handler_settings']['target_bundles'] = [];
+
+    if (isset($source_settings['referenceable_types'])) {
+      $node_types = array_filter($source_settings['referenceable_types']);
+      if (!empty($node_types)) {
+        $settings['handler_settings']['target_bundles'] = $this->lookupMigrations($this->nodeTypeMigration, $node_types);
+      }
+    }
+    return $settings;
+  }
+
 }
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/field/ReferenceBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/ReferenceBase.php
new file mode 100644
index 0000000..9ad816a
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/ReferenceBase.php
@@ -0,0 +1,130 @@
+<?php
+
+namespace Drupal\migrate_drupal\Plugin\migrate\field;
+
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\migrate\MigrateExecutable;
+use Drupal\migrate\MigrateMessage;
+use Drupal\migrate\Plugin\MigrationInterface;
+use Drupal\migrate\Plugin\MigratePluginManager;
+use Drupal\migrate\Plugin\MigrationPluginManagerInterface;
+use Drupal\migrate\Row;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+ * Base class for entity reference fields.
+ */
+abstract class ReferenceBase extends FieldPluginBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * The migration plugin manager.
+   *
+   * @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface
+   */
+  protected $migrationPluginManager;
+
+  /**
+   * The migrate process plugin manager.
+   *
+   * @var \Drupal\migrate\Plugin\MigratePluginManager
+   */
+  protected $migrateProcessPluginManager;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationPluginManagerInterface $migration_plugin_manager, MigratePluginManager $migrate_process_plugin_manager) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->migrationPluginManager = $migration_plugin_manager;
+    $this->migrateProcessPluginManager = $migrate_process_plugin_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('plugin.manager.migration'),
+      $container->get('plugin.manager.migrate.process')
+    );
+  }
+
+  /**
+   * Gets the name of the field property which holds the entity ID.
+   *
+   * @return string
+   */
+  abstract protected function entityId();
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFieldFormatterMap() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
+    $process = [
+      'plugin' => 'iterator',
+      'source' => $field_name,
+      'process' => array(
+        'target_id' => $this->entityId(),
+      ),
+    ];
+    $migration->setProcessOfProperty($field_name, $process);
+  }
+
+  /**
+   * Look up migrated role IDs from a migration.
+   *
+   * @param string $migration_id
+   *   The migration ID which migrated the source.
+   * @param array $source_ids
+   *   The source IDs.
+   *
+   * @return array
+   *   The migrated IDs.
+   */
+  protected function lookupMigrations($migration_id, array $source_ids) {
+    // Configure the migration process plugin to look up migrated IDs from
+    // the migration.
+    $migration_plugin_configuration = [
+      'migration' => $migration_id,
+    ];
+
+    $row = new Row([], []);
+
+    /** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
+    $migration = $this->migrationPluginManager->createStubMigration([]);
+
+    /** @var \Drupal\migrate\Plugin\MigrateProcessInterface $migrationProcessPlugin */
+    $migrationProcessPlugin = $this->migrateProcessPluginManager
+      ->createInstance('migration', $migration_plugin_configuration, $migration);
+
+    $executable = new MigrateExecutable($migration, new MigrateMessage());
+
+    $ids = [];
+    foreach ($source_ids as $source_id) {
+      $ids[] = $migrationProcessPlugin->transform($source_id, $executable, $row, NULL);
+    }
+    return array_combine($ids, $ids);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFieldWidgetMap() {
+    return [
+      $this->pluginId . '_select' => 'options_select',
+      $this->pluginId . '_buttons' => 'options_buttons',
+      $this->pluginId . '_autocomplete' => 'entity_reference_autocomplete',
+    ];
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php
index 11df8ec..2e0c40e 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php
@@ -3,6 +3,7 @@
 namespace Drupal\migrate_drupal\Plugin\migrate\field;
 
 use Drupal\migrate\Plugin\MigrationInterface;
+use Drupal\migrate\Row;
 
 /**
  * @MigrateField(
@@ -13,7 +14,40 @@
  *   },
  * )
  */
-class UserReference extends FieldPluginBase {
+class UserReference extends ReferenceBase {
+
+  /**
+   * The plugin ID for the user role migration.
+   *
+   * @var string
+   */
+  protected $userRoleMigration = 'd6_user_role';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function entityId() {
+    return 'uid';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldStorageSettings(Row $row) {
+    $settings['target_type'] = 'user';
+    return $settings;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function processFieldInstance(MigrationInterface $migration) {
+    parent::processFieldInstance($migration);
+
+    $migration_dependencies = $migration->get('migration_dependencies');
+    $migration_dependencies['required'][] = $this->userRoleMigration;
+    $migration->set('migration_dependencies', $migration_dependencies);
+  }
 
   /**
    * {@inheritdoc}
@@ -33,4 +67,25 @@ public function processFieldValues(MigrationInterface $migration, $field_name, $
     $migration->setProcessOfProperty($field_name, $process);
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldInstanceSettings(Row $row) {
+    $source_settings = $row->getSourceProperty('global_settings');
+    $settings['handler'] = 'default:user';
+    $settings['handler_settings']['include_anonymous'] = FALSE;
+    $settings['handler_settings']['filter']['type'] = '_none';
+    $settings['handler_settings']['target_bundles'] = NULL;
+
+    if (isset($source_settings['referenceable_roles'])) {
+      $roles = array_filter($source_settings['referenceable_roles']);
+      if (!empty($roles)) {
+        $settings['handler_settings']['filter']['type'] = 'role';
+        $settings['handler_settings']['filter']['role'] = $this->lookupMigrations($this->userRoleMigration, $roles);
+      }
+    }
+
+    return $settings;
+  }
+
 }
diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal6.php b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
index 4ca588b..7b19cae 100644
--- a/core/modules/migrate_drupal/tests/fixtures/drupal6.php
+++ b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
@@ -2308,6 +2308,90 @@
 ))
 ->execute();
 
+$connection->schema()->createTable('content_field_node_reference', array(
+  'fields' => array(
+    'vid' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'default' => '0',
+      'unsigned' => TRUE,
+    ),
+    'nid' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'default' => '0',
+      'unsigned' => TRUE,
+    ),
+    'delta' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'default' => '0',
+      'unsigned' => TRUE,
+    ),
+    'field_node_reference_nid' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+  ),
+  'primary key' => array(
+    'vid',
+    'delta',
+  ),
+  'indexes' => array(
+    'nid' => array(
+      'nid',
+    ),
+    'field_node_reference_nid' => array(
+      'field_node_reference_nid',
+    ),
+  ),
+  'mysql_character_set' => 'utf8',
+));
+
+$connection->insert('content_field_node_reference')
+->fields(array(
+  'vid',
+  'nid',
+  'delta',
+  'field_node_reference_nid',
+))
+->values(array(
+  'vid' => '1',
+  'nid' => '1',
+  'delta' => '0',
+  'field_node_reference_nid' => 2,
+))
+->values(array(
+  'vid' => '2',
+  'nid' => '1',
+  'delta' => '0',
+  'field_node_reference_nid' => NULL,
+))
+->values(array(
+  'vid' => '3',
+  'nid' => '2',
+  'delta' => '0',
+  'field_node_reference_nid' => NULL,
+))
+->values(array(
+  'vid' => '5',
+  'nid' => '2',
+  'delta' => '0',
+  'field_node_reference_nid' => NULL,
+))
+->values(array(
+  'vid' => '12',
+  'nid' => '9',
+  'delta' => '0',
+  'field_node_reference_nid' => NULL,
+))
+->execute();
+
 $connection->schema()->createTable('content_field_test', array(
   'fields' => array(
     'vid' => array(
@@ -2538,6 +2622,90 @@
 ))
 ->execute();
 
+$connection->schema()->createTable('content_field_user_reference', array(
+  'fields' => array(
+    'vid' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'default' => '0',
+      'unsigned' => TRUE,
+    ),
+    'nid' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'default' => '0',
+      'unsigned' => TRUE,
+    ),
+    'delta' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'size' => 'normal',
+      'default' => '0',
+      'unsigned' => TRUE,
+    ),
+    'field_user_reference_uid' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+  ),
+  'primary key' => array(
+    'vid',
+    'delta',
+  ),
+  'indexes' => array(
+    'nid' => array(
+      'nid',
+    ),
+    'field_user_reference_uid' => array(
+      'field_user_reference_uid',
+    ),
+  ),
+  'mysql_character_set' => 'utf8',
+));
+
+$connection->insert('content_field_user_reference')
+->fields(array(
+  'vid',
+  'nid',
+  'delta',
+  'field_user_reference_uid',
+))
+->values(array(
+  'vid' => '1',
+  'nid' => '1',
+  'delta' => '0',
+  'field_user_reference_uid' => NULL,
+))
+->values(array(
+  'vid' => '2',
+  'nid' => '1',
+  'delta' => '0',
+  'field_user_reference_uid' => NULL,
+))
+->values(array(
+  'vid' => '3',
+  'nid' => '2',
+  'delta' => '0',
+  'field_user_reference_uid' => NULL,
+))
+->values(array(
+  'vid' => '5',
+  'nid' => '2',
+  'delta' => '0',
+  'field_user_reference_uid' => NULL,
+))
+->values(array(
+  'vid' => '12',
+  'nid' => '9',
+  'delta' => '0',
+  'field_user_reference_uid' => NULL,
+))
+->execute();
+
 $connection->schema()->createTable('content_group', array(
   'fields' => array(
     'group_type' => array(
@@ -2729,6 +2897,30 @@
   'locked' => '0',
 ))
 ->values(array(
+  'field_name' => 'field_node_reference',
+  'type' => 'nodereference',
+  'global_settings' => 'a:1:{s:19:"referenceable_types";a:9:{s:7:"article";i:0;s:7:"company";i:0;s:8:"employee";i:0;s:10:"test_event";i:0;s:9:"test_page";i:0;s:11:"test_planet";i:0;s:10:"test_story";i:0;s:7:"sponsor";i:0;s:5:"story";i:0;}}',
+  'required' => '0',
+  'multiple' => '1',
+  'db_storage' => '0',
+  'module' => 'nodereference',
+  'db_columns' => 'a:1:{s:3:"nid";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:0;s:5:"index";b:1;}}',
+  'active' => '1',
+  'locked' => '0',
+))
+->values(array(
+  'field_name' => 'field_node_reference_2',
+  'type' => 'nodereference',
+  'global_settings' => 'a:1:{s:19:"referenceable_types";a:9:{s:7:"article";s:7:"article";s:7:"company";i:0;s:8:"employee";i:0;s:10:"test_event";i:0;s:9:"test_page";i:0;s:11:"test_planet";i:0;s:10:"test_story";i:0;s:7:"sponsor";i:0;s:5:"story";i:0;}}',
+  'required' => '0',
+  'multiple' => '0',
+  'db_storage' => '1',
+  'module' => 'nodereference',
+  'db_columns' => 'a:1:{s:3:"nid";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:0;s:5:"index";b:1;}}',
+  'active' => '1',
+  'locked' => '0',
+))
+->values(array(
   'field_name' => 'field_test',
   'type' => 'text',
   'global_settings' => 'a:4:{s:15:"text_processing";s:1:"1";s:10:"max_length";s:0:"";s:14:"allowed_values";s:0:"";s:18:"allowed_values_php";s:0:"";}',
@@ -2968,6 +3160,30 @@
   'active' => '1',
   'locked' => '0',
 ))
+->values(array(
+  'field_name' => 'field_user_reference',
+  'type' => 'userreference',
+  'global_settings' => 'a:2:{s:19:"referenceable_roles";a:4:{i:2;i:0;i:3;i:0;i:4;i:0;i:5;i:0;}s:20:"referenceable_status";s:0:"";}',
+  'required' => '0',
+  'multiple' => '1',
+  'db_storage' => '0',
+  'module' => 'userreference',
+  'db_columns' => 'a:1:{s:3:"uid";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:0;s:5:"index";b:1;}}',
+  'active' => '1',
+  'locked' => '0',
+))
+->values(array(
+  'field_name' => 'field_user_reference_2',
+  'type' => 'userreference',
+  'global_settings' => 'a:2:{s:19:"referenceable_roles";a:4:{i:3;i:3;i:2;i:0;i:4;i:0;i:5;i:0;}s:20:"referenceable_status";s:1:"1";}',
+  'required' => '0',
+  'multiple' => '0',
+  'db_storage' => '1',
+  'module' => 'userreference',
+  'db_columns' => 'a:1:{s:3:"uid";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:0;s:5:"index";b:1;}}',
+  'active' => '1',
+  'locked' => '0',
+))
 ->execute();
 
 $connection->schema()->createTable('content_node_field_instance', array(
@@ -3087,6 +3303,30 @@
   'widget_active' => '1',
 ))
 ->values(array(
+  'field_name' => 'field_node_reference',
+  'type_name' => 'story',
+  'weight' => '21',
+  'label' => 'Node reference',
+  'widget_type' => 'nodereference_autocomplete',
+  'widget_settings' => 'a:4:{s:18:"autocomplete_match";s:8:"contains";s:4:"size";s:2:"60";s:13:"default_value";a:1:{i:0;a:2:{s:3:"nid";N;s:14:"_error_element";s:55:"default_value_widget][field_node_reference][0][nid][nid";}}s:17:"default_value_php";N;}',
+  'display_settings' => 'a:5:{s:5:"label";a:2:{s:6:"format";s:5:"above";s:7:"exclude";i:0;}i:5;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:6:"teaser";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:4:"full";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}i:4;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}}',
+  'description' => '',
+  'widget_module' => 'nodereference',
+  'widget_active' => '1',
+))
+->values(array(
+  'field_name' => 'field_node_reference_2',
+  'type_name' => 'story',
+  'weight' => '23',
+  'label' => 'Node reference 2',
+  'widget_type' => 'nodereference_select',
+  'widget_settings' => 'a:4:{s:18:"autocomplete_match";s:8:"contains";s:4:"size";i:60;s:13:"default_value";a:1:{i:0;a:1:{s:3:"nid";s:0:"";}}s:17:"default_value_php";N;}',
+  'display_settings' => 'a:5:{s:5:"label";a:2:{s:6:"format";s:5:"above";s:7:"exclude";i:0;}i:5;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:6:"teaser";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:4:"full";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}i:4;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}}',
+  'description' => '',
+  'widget_module' => 'nodereference',
+  'widget_active' => '1',
+))
+->values(array(
   'field_name' => 'field_test',
   'type_name' => 'story',
   'weight' => '1',
@@ -3350,6 +3590,30 @@
   'widget_module' => 'number',
   'widget_active' => '1',
 ))
+->values(array(
+  'field_name' => 'field_user_reference',
+  'type_name' => 'story',
+  'weight' => '20',
+  'label' => 'User reference',
+  'widget_type' => 'userreference_autocomplete',
+  'widget_settings' => 'a:5:{s:18:"autocomplete_match";s:8:"contains";s:4:"size";s:2:"60";s:12:"reverse_link";i:0;s:13:"default_value";a:1:{i:0;a:2:{s:3:"uid";N;s:14:"_error_element";s:55:"default_value_widget][field_user_reference][0][uid][uid";}}s:17:"default_value_php";N;}',
+  'display_settings' => 'a:5:{s:5:"label";a:2:{s:6:"format";s:5:"above";s:7:"exclude";i:0;}i:5;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:6:"teaser";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:4:"full";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}i:4;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}}',
+  'description' => '',
+  'widget_module' => 'userreference',
+  'widget_active' => '1',
+))
+->values(array(
+  'field_name' => 'field_user_reference_2',
+  'type_name' => 'story',
+  'weight' => '21',
+  'label' => 'User reference 2',
+  'widget_type' => 'userreference_select',
+  'widget_settings' => 'a:5:{s:18:"autocomplete_match";s:8:"contains";s:4:"size";i:60;s:12:"reverse_link";i:0;s:13:"default_value";a:1:{i:0;a:1:{s:3:"uid";s:0:"";}}s:17:"default_value_php";N;}',
+  'display_settings' => 'a:5:{s:5:"label";a:2:{s:6:"format";s:5:"above";s:7:"exclude";i:0;}i:5;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:6:"teaser";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:4:"full";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}i:4;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}}',
+  'description' => '',
+  'widget_module' => 'userreference',
+  'widget_active' => '1',
+))
 ->execute();
 
 $connection->schema()->createTable('content_type_employee', array(
@@ -3374,6 +3638,18 @@
       'size' => 'normal',
       'unsigned' => TRUE,
     ),
+    'field_user_reference_2_uid' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'field_node_reference_2_nid' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
   ),
   'primary key' => array(
     'vid',
@@ -3588,6 +3864,18 @@
       'not null' => FALSE,
       'length' => '100',
     ),
+    'field_user_reference_2_uid' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
+    'field_node_reference_2_nid' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'size' => 'normal',
+      'unsigned' => TRUE,
+    ),
   ),
   'primary key' => array(
     'vid',
@@ -3596,6 +3884,12 @@
     'nid' => array(
       'nid',
     ),
+    'field_user_reference_2_uid' => array(
+      'field_user_reference_2_uid',
+    ),
+    'field_node_reference_2_nid' => array(
+      'field_node_reference_2_nid',
+    ),
   ),
   'mysql_character_set' => 'utf8',
 ));
@@ -3631,6 +3925,8 @@
   'field_test_text_single_checkbox2_value',
   'field_test_datestamp_value2',
   'field_test_datetime_value2',
+  'field_user_reference_2_uid',
+  'field_node_reference_2_nid',
 ))
 ->values(array(
   'nid' => '1',
@@ -3662,6 +3958,8 @@
   'field_test_text_single_checkbox2_value' => 'Hello',
   'field_test_datestamp_value2' => NULL,
   'field_test_datetime_value2' => NULL,
+  'field_user_reference_2_uid' => NULL,
+  'field_node_reference_2_nid' => NULL,
 ))
 ->values(array(
   'nid' => '1',
@@ -3693,6 +3991,8 @@
   'field_test_text_single_checkbox2_value' => NULL,
   'field_test_datestamp_value2' => NULL,
   'field_test_datetime_value2' => NULL,
+  'field_user_reference_2_uid' => NULL,
+  'field_node_reference_2_nid' => NULL,
 ))
 ->values(array(
   'nid' => '2',
@@ -3724,6 +4024,8 @@
   'field_test_text_single_checkbox2_value' => NULL,
   'field_test_datestamp_value2' => NULL,
   'field_test_datetime_value2' => NULL,
+  'field_user_reference_2_uid' => NULL,
+  'field_node_reference_2_nid' => NULL,
 ))
 ->values(array(
   'nid' => '2',
@@ -3755,6 +4057,8 @@
   'field_test_text_single_checkbox2_value' => NULL,
   'field_test_datestamp_value2' => NULL,
   'field_test_datetime_value2' => NULL,
+  'field_user_reference_2_uid' => NULL,
+  'field_node_reference_2_nid' => NULL,
 ))
 ->values(array(
   'nid' => '9',
@@ -3786,6 +4090,8 @@
   'field_test_text_single_checkbox2_value' => 'Off',
   'field_test_datestamp_value2' => '1391357160',
   'field_test_datetime_value2' => '2015-03-04 06:07:00',
+  'field_user_reference_2_uid' => NULL,
+  'field_node_reference_2_nid' => NULL,
 ))
 ->execute();
 
@@ -45994,10 +46300,10 @@
   'name' => 'marvin',
   'type' => 'theme',
   'owner' => '',
-  'status' => '0',
+  'status' => '1',
   'throttle' => '0',
   'bootstrap' => '0',
-  'schema_version' => '-1',
+  'schema_version' => '6002',
   'weight' => '0',
   'info' => 'a:13:{s:4:"name";s:6:"Marvin";s:11:"description";s:31:"Boxy tabled theme in all grays.";s:7:"regions";a:2:{s:4:"left";s:12:"Left sidebar";s:5:"right";s:13:"Right sidebar";}s:7:"version";s:4:"6.38";s:4:"core";s:3:"6.x";s:10:"base theme";s:9:"chameleon";s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1456343372";s:8:"features";a:10:{i:0;s:20:"comment_user_picture";i:1;s:7:"favicon";i:2;s:7:"mission";i:3;s:4:"logo";i:4;s:4:"name";i:5;s:17:"node_user_picture";i:6;s:6:"search";i:7;s:6:"slogan";i:8;s:13:"primary_links";i:9;s:15:"secondary_links";}s:11:"stylesheets";a:1:{s:3:"all";a:1:{s:9:"style.css";s:33:"themes/chameleon/marvin/style.css";}}s:7:"scripts";a:1:{s:9:"script.js";s:33:"themes/chameleon/marvin/script.js";}s:10:"screenshot";s:38:"themes/chameleon/marvin/screenshot.png";s:3:"php";s:5:"4.3.5";}',
 ))
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
index 3a9467e..1144f94 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
@@ -76,6 +76,8 @@ protected function migrateContentTypes() {
   protected function migrateFields() {
     $this->migrateContentTypes();
     $this->executeMigrations([
+      'd6_filter_format',
+      'd6_user_role',
       'd6_field',
       'd6_field_instance',
       'd6_field_instance_widget_settings',
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php
index 993fdf4..4d4968b 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php
@@ -44,8 +44,8 @@ protected function getEntityCounts() {
       'contact_form' => 5,
       'configurable_language' => 5,
       'editor' => 2,
-      'field_config' => 72,
-      'field_storage_config' => 48,
+      'field_config' => 76,
+      'field_storage_config' => 51,
       'file' => 7,
       'filter_format' => 7,
       'image_style' => 5,
diff --git a/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php
index 56ec20a..b549f8a 100644
--- a/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php
+++ b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php
@@ -2,8 +2,9 @@
 
 namespace Drupal\taxonomy\Plugin\migrate\field;
 
+use Drupal\migrate_drupal\Plugin\migrate\field\ReferenceBase;
 use Drupal\migrate\Plugin\MigrationInterface;
-use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
+use Drupal\migrate\Row;
 
 /**
  * @MigrateField(
@@ -14,7 +15,22 @@
  *   core = {6,7}
  * )
  */
-class TaxonomyTermReference extends FieldPluginBase {
+class TaxonomyTermReference extends ReferenceBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function entityId() {
+    return 'tid';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldStorageSettings(Row $row) {
+    $settings['target_type'] = 'taxonomy_term';
+    return $settings;
+  }
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/text/src/Plugin/migrate/cckfield/TextField.php b/core/modules/text/src/Plugin/migrate/cckfield/TextField.php
index e2511de..58d416b 100644
--- a/core/modules/text/src/Plugin/migrate/cckfield/TextField.php
+++ b/core/modules/text/src/Plugin/migrate/cckfield/TextField.php
@@ -136,4 +136,15 @@ public function getFieldType(Row $row) {
     }
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function transformFieldStorageSettings(Row $row) {
+    $settings = parent::transformFieldStorageSettings($row);
+    $global_settings = $row->getSourceProperty('global_settings');
+    $max_length = isset($global_settings['max_length']) ? $global_settings['max_length'] : '';
+    $settings['max_length'] = empty($max_length) ? 255 : $max_length;
+    return $settings;
+  }
+
 }
