diff --git a/core/modules/node/src/NodeGrantDatabaseStorage.php b/core/modules/node/src/NodeGrantDatabaseStorage.php
index 6b6f280..ae43123 100644
--- a/core/modules/node/src/NodeGrantDatabaseStorage.php
+++ b/core/modules/node/src/NodeGrantDatabaseStorage.php
@@ -190,7 +190,16 @@ public function alterQuery($query, array $tables, $op, AccountInterface $account
         // Now handle entities.
         $subquery->where("$nalias.$field = na.nid");
 
-        $query->exists($subquery);
+        // If it's a left join to entity table and entity does not exist (i.e.
+        // entity_id is null) then skip access check.
+        if ($tableinfo['join type'] == 'LEFT') {
+          $subquery_cond = db_or();
+          $subquery_cond->exists($subquery);
+          $subquery_cond->isNull("$nalias.$field");
+          $query->condition($subquery_cond);
+        } else {
+          $query->exists($subquery);
+        }
       }
     }
   }
diff --git a/core/modules/views/src/Tests/NodeAccessTest.php b/core/modules/views/src/Tests/NodeAccessTest.php
new file mode 100644
index 0000000..851f5a1
--- /dev/null
+++ b/core/modules/views/src/Tests/NodeAccessTest.php
@@ -0,0 +1,144 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\views\Tests\NodeAccessTest.
+ */
+
+namespace Drupal\views\Tests;
+
+use Drupal\field\Tests\Views\FieldTestBase;
+use Drupal\views\Views;
+use Drupal\views\ViewExecutable;
+
+/**
+ * Tests Node Access.
+ *
+ * @group views
+ */
+class NodeAccessTest extends FieldTestBase {
+
+  /**
+   * Views used by this test.
+   *
+   * @var array
+   */
+  public static $testViews = [];
+
+  /**
+   * A user with permission to access admin pages and administer languages.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * A non-administrator user for this test.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $regularUser;
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['user', 'node', 'entity_reference', 'views', 'views_test_config'];
+
+  protected function setUp() {
+    parent::setUp(FALSE);
+
+    // User to add and remove language.
+    $this->adminUser = $this->drupalCreateUser(['bypass node access']);
+    // User to check non-admin access.
+    $this->regularUser = $this->drupalCreateUser(['access content']);
+
+    // Create Basic page and Article node types.
+    $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
+
+    $field_names = $this->setUpFieldStorages(1);
+
+    // Attach the field to nodes only.
+    $field = [
+      'field_name' => $field_names[0],
+      'entity_type' => 'node',
+      'bundle' => 'page',
+    ];
+    entity_create('field_config', $field)->save();
+
+    // Create Entity Reference field.
+    $this->fieldStorages[] = entity_create('field_storage_config', [
+      'field_name' => 'field_related_pages',
+      'entity_type' => 'node',
+      'type' => 'entity_reference',
+      'settings' => ['target_type' => 'node'],
+    ]);
+    end($this->fieldStorages)->save();
+
+    // Attach the entity_reference field to articles only.
+    $field = entity_create('field_config', [
+      'field_storage' => end($this->fieldStorages),
+      'bundle' => 'article',
+      'settings' => [
+        'handler' => 'default',
+        'handler_settings' => [
+          'target_bundles' => ['article'],
+          'sort' => ['field' => '_none'],
+        ],
+      ],
+    ]);
+    $field->save();
+
+    // Now create some example nodes for the view result.
+    for ($i = 0; $i < 2; $i++) {
+      $edit = [
+        $field_names[0] => [
+          ['value' => $this->randomMachineName()],
+        ],
+      ];
+      if ($i > 0) {
+        // For 2nd node, set the entity reference field value to the 1st node.
+        $edit['field_related_pages'][0]['target_id'] = 1;
+      }
+      $nodes[] = $this->drupalCreateNode($edit);
+    }
+
+    $this->container->get('views.views_data')->clear();
+    self::$testViews = ['test_articles'];
+    ViewTestData::createTestViews(get_class($this), ['views_test_config']);
+  }
+
+  /**
+   * Unit testing the view.
+   *
+   */
+  function testViewsData() {
+    $this->drupalLogin($this->regularUser);
+    $this->drupalGet('test-articles');
+    $rows = count($this->xpath("//div[@class='views-row']"));
+    $this->assertTrue($rows == 2, "View has right amount of rows.");
+
+
+    $this->drupalLogin($this->adminUser);
+    $this->drupalGet('test-articles');
+    $rows = count($this->xpath("//div[@class='views-row']"));
+    $this->assertTrue($rows == 2, "View has right amount of rows.");
+
+    // Rebuild permissions.
+    // Enable the mynodeaccess module.
+    \Drupal::service('module_installer')->install(['views_test_mynodeaccess']);
+    node_access_rebuild();
+
+    $this->drupalLogin($this->regularUser);
+    $this->drupalGet('test-articles');
+    $rows = count($this->xpath("//div[@class='views-row']"));
+    $this->assertTrue($rows == 2, "View has right amount of rows.");
+
+    $this->drupalLogin($this->adminUser);
+    $this->drupalGet('test-articles');
+    $rows = count($this->xpath("//div[@class='views-row']"));
+    $this->assertTrue($rows == 2, "View has right amount of rows.");
+  }
+
+}
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_articles.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_articles.yml
new file mode 100644
index 0000000..70539ac
--- /dev/null
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_articles.yml
@@ -0,0 +1,215 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - node
+    - user
+id: test_articles
+label: test_articles
+module: views
+description: ''
+tag: ''
+base_table: node_field_data
+base_field: nid
+core: 8.x
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: 0
+    display_options:
+      access:
+        type: perm
+        options:
+          perm: 'access content'
+      cache:
+        type: none
+        options: {  }
+      query:
+        type: views_query
+        options:
+          disable_sql_rewrite: false
+          distinct: false
+          replica: false
+          query_comment: ''
+          query_tags: {  }
+      exposed_form:
+        type: basic
+        options:
+          submit_button: Apply
+          reset_button: false
+          reset_button_label: Reset
+          exposed_sorts_label: 'Sort by'
+          expose_sort_order: true
+          sort_asc_label: Asc
+          sort_desc_label: Desc
+      pager:
+        type: none
+        options:
+          offset: 0
+      style:
+        type: default
+      row:
+        type: fields
+        options:
+          default_field_elements: true
+          inline: {  }
+          separator: ''
+          hide_empty: false
+      fields:
+        title:
+          id: title
+          table: node_field_data
+          field: title
+          entity_type: node
+          entity_field: title
+          label: ''
+          alter:
+            alter_text: false
+            make_link: false
+            absolute: false
+            trim: false
+            word_boundary: false
+            ellipsis: false
+            strip_tags: false
+            html: false
+          hide_empty: false
+          empty_zero: false
+          settings:
+            link_to_entity: true
+          plugin_id: field
+          relationship: none
+          group_type: group
+          admin_label: ''
+          exclude: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_alter_empty: true
+          click_sort_column: value
+          type: string
+          group_column: value
+          group_columns: {  }
+          group_rows: true
+          delta_limit: 0
+          delta_offset: 0
+          delta_reversed: false
+          delta_first_last: false
+          multi_type: separator
+          separator: ', '
+          field_api_classes: false
+        title_1:
+          id: title_1
+          table: node_field_data
+          field: title
+          relationship: field_related_pages
+          group_type: group
+          admin_label: ''
+          label: ''
+          exclude: false
+          alter:
+            alter_text: false
+            text: ''
+            make_link: false
+            path: ''
+            absolute: false
+            external: false
+            replace_spaces: false
+            path_case: none
+            trim_whitespace: false
+            alt: ''
+            rel: ''
+            link_class: ''
+            prefix: ''
+            suffix: ''
+            target: ''
+            nl2br: false
+            max_length: 0
+            word_boundary: true
+            ellipsis: true
+            more_link: false
+            more_link_text: ''
+            more_link_path: ''
+            strip_tags: false
+            trim: false
+            preserve_tags: ''
+            html: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: false
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_empty: false
+          empty_zero: false
+          hide_alter_empty: true
+          click_sort_column: value
+          type: string
+          settings:
+            link_to_entity: true
+          group_column: value
+          group_columns: {  }
+          group_rows: true
+          delta_limit: 0
+          delta_offset: 0
+          delta_reversed: false
+          delta_first_last: false
+          multi_type: separator
+          separator: ', '
+          field_api_classes: false
+          entity_type: node
+          entity_field: title
+          plugin_id: field
+      filters: {  }
+      sorts: {  }
+      title: test_articles
+      header: {  }
+      footer: {  }
+      empty: {  }
+      relationships:
+        field_related_pages:
+          id: field_related_pages
+          table: node__field_related_pages
+          field: field_related_pages
+          relationship: none
+          group_type: group
+          admin_label: 'field_related_pages: Content'
+          required: false
+          plugin_id: standard
+      arguments: {  }
+      display_extenders: {  }
+      filter_groups:
+        operator: AND
+        groups: {  }
+    cache_metadata:
+      contexts:
+        - 'languages:language_content'
+        - 'languages:language_interface'
+        - 'user.node_grants:view'
+        - user.permissions
+      cacheable: false
+  page_1:
+    display_plugin: page
+    id: page_1
+    display_title: Page
+    position: 1
+    display_options:
+      display_extenders: {  }
+      path: test-articles
+    cache_metadata:
+      contexts:
+        - 'languages:language_content'
+        - 'languages:language_interface'
+        - 'user.node_grants:view'
+        - user.permissions
+      cacheable: false
diff --git a/core/modules/views/tests/modules/views_test_mynodeaccess/views_test_mynodeaccess.info.yml b/core/modules/views/tests/modules/views_test_mynodeaccess/views_test_mynodeaccess.info.yml
new file mode 100644
index 0000000..4e14307
--- /dev/null
+++ b/core/modules/views/tests/modules/views_test_mynodeaccess/views_test_mynodeaccess.info.yml
@@ -0,0 +1,8 @@
+name: 'My node access test module'
+description: Implement hook_node_grants and see what happens.
+package: Testing
+type: module
+version: VERSION
+core: 8.x
+dependencies:
+  - node
diff --git a/core/modules/views/tests/modules/views_test_mynodeaccess/views_test_mynodeaccess.module b/core/modules/views/tests/modules/views_test_mynodeaccess/views_test_mynodeaccess.module
new file mode 100644
index 0000000..e7b219c
--- /dev/null
+++ b/core/modules/views/tests/modules/views_test_mynodeaccess/views_test_mynodeaccess.module
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @file
+ * Test module for testing the node access system.
+ *
+ * Check whether simply implementing hook_node_access() is enough to reproduce
+ * the bug in https://www.drupal.org/node/1969208 .
+ * Some pieces stolen from node_access_test module.
+ */
+
+use Drupal\Core\Access\AccessResult;
+use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\field\Entity\FieldConfig;
+use Drupal\node\NodeTypeInterface;
+use Drupal\node\NodeInterface;
+
+/**
+ * Implements hook_node_grants().
+ *
+ * @see \Drupal\node\Tests\NodeQueryAlterTest::testNodeQueryAlterOverride()
+ * @see \Drupal\node\Tests\NodeAccessPagerTest
+ * @see mynodeaccess.permissions.yml
+ * @see mynodeaccess_node_access_records()
+ */
+function views_test_mynodeaccess_node_grants($account, $op) {
+  return array(
+    'all' => array(0),
+  );
+}
