diff --git a/core/modules/path/path.module b/core/modules/path/path.module
index af72f24..f7e922f 100644
--- a/core/modules/path/path.module
+++ b/core/modules/path/path.module
@@ -42,7 +42,7 @@ function path_help($route_name, RouteMatchInterface $route_match) {
  */
 function path_form_node_form_alter(&$form, FormStateInterface $form_state) {
   $node = $form_state->getFormObject()->getEntity();
-  if ($node->hasField('path') && $node->get('path')->access('edit')) {
+  if ($node->hasField('path') && $node->get('path')->access('edit') && isset($form['path'])) {
     $form['path_settings'] = array(
       '#type' => 'details',
       '#title' => t('URL path settings'),
diff --git a/core/modules/path/src/Tests/PathNodeFormTest.php b/core/modules/path/src/Tests/PathNodeFormTest.php
new file mode 100644
index 0000000..d6d869f
--- /dev/null
+++ b/core/modules/path/src/Tests/PathNodeFormTest.php
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\path\Tests\PathAdminTest.
+ */
+
+namespace Drupal\path\Tests;
+
+/**
+ * Tests the Path Node form UI.
+ *
+ * @group path
+ */
+class PathNodeFormTest extends PathTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('node', 'path');
+
+  protected function setUp() {
+    parent::setUp();
+
+    // Create test user and login.
+    $web_user = $this->drupalCreateUser(array('create page content', 'create url aliases'));
+    $this->drupalLogin($web_user);
+  }
+
+  /**
+   * Tests the node form ui.
+   */
+  public function testNodeForm() {
+    $this->drupalGet('node/add/page');
+
+    // Make sure we have a Path fieldset and Path fields.
+    $this->assertRaw(' id="edit-path-settings"', 'Path settings details exists');
+    $this->assertFieldByName('path[0][alias]', NULL, 'Path alias field exists');
+
+    // Disable the Path field for this content type.
+    entity_get_form_display('node', 'page', 'default')
+      ->removeComponent('path')
+      ->save();
+
+    $this->drupalGet('node/add/page');
+
+    // See if the whole fieldset is gone now.
+    $this->assertNoRaw(' id="edit-path-settings"', 'Path settings details does not exist');
+    $this->assertNoFieldByName('path[0][alias]', NULL, 'Path alias field does not exist');
+  }
+
+}
