diff --git a/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php
index 37e40d4..76ead5b 100644
--- a/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php
+++ b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php
@@ -165,8 +165,11 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
    * {@inheritdoc}
    */
   public function isEmpty() {
-    $value = $this->get('url')->getValue();
-    return $value === NULL || $value === '';
+    if ($this->isExternal()) {
+      $value = $this->get('url')->getValue();
+      return $value === NULL || $value === '';
+    }
+    return FALSE;
   }
 
   /**
diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
index e0666d9..7368bd0 100644
--- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
+++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
@@ -212,6 +212,8 @@ public function massageFormValues(array $values, array $form, FormStateInterface
         // Reset the URL value to contain only the path.
         if (!$url->isExternal() && $this->supportsInternalLinks()) {
           $value['url'] = substr($url->toString(), strlen(\Drupal::request()->getBasePath() . '/'));
+          $value['route_name'] =  $url->getRouteName();
+          $value['route_parameters'] = $url->getRouteParameters();
         }
       }
     }
diff --git a/core/modules/link/src/Tests/LinkFieldTest.php b/core/modules/link/src/Tests/LinkFieldTest.php
index 8160782..4697aad 100644
--- a/core/modules/link/src/Tests/LinkFieldTest.php
+++ b/core/modules/link/src/Tests/LinkFieldTest.php
@@ -124,6 +124,8 @@ function testURLValidation() {
     );
 
     // Test external and internal URLs for 'link_type' = LinkItemInterface::LINK_GENERIC.
+    $this->field->settings['link_type'] = LinkItemInterface::LINK_GENERIC;
+    $this->field->save();
     $this->assertValidEntries($field_name, $valid_external_entries + $valid_internal_entries);
     $this->assertInvalidEntries($field_name, $invalid_external_entries + $invalid_internal_entries);
 
@@ -158,6 +160,10 @@ protected function assertValidEntries($field_name, array $valid_entries) {
       $id = $match[1];
       $this->assertText(t('entity_test @id has been created.', array('@id' => $id)));
       $this->assertRaw($value);
+      // Verify that we can load the entity for an internal URL.
+      if (!Url::fromRoute($value)->isExternal()) {
+        $this->drupalGet('entity_test/' . $id);
+      }
     }
   }
 
