From db91de7607619e8c265b6864783c916337aa8315 Mon Sep 17 00:00:00 2001
From: Rajab Natshah <rajabn@gmail.com>
Date: Wed, 15 Mar 2023 13:03:58 +0300
Subject: [PATCH] Issue #3348097: Fix Entity queries must explicitly set
 whether the query should be access checked or not in Varbase Core

---
 composer.json                                               | 6 +++++-
 .../varbase_default_content/varbase_default_content.install | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/composer.json b/composer.json
index a1affe2a..72f5a4ea 100644
--- a/composer.json
+++ b/composer.json
@@ -85,7 +85,7 @@
     "drupal/node_edit_protection": "~1.0",
     "drupal/rabbit_hole": "~1.0",
     "drupal/yoast_seo": "~1.0",
-    "drupal/diff": "~1.0",
+    "drupal/diff": "1.1.0",
     "drupal/masquerade": "~2.0",
     "drupal/menu_admin_per_menu": "~1.0",
     "drupal/drd_agent": "~4.0",
@@ -190,6 +190,10 @@
       "drupal/admin_toolbar": {
         "Issue #3338408: Resolve access check errors for D10 compatibility":
         "https://www.drupal.org/files/issues/2023-02-01/admin_toolbar-resolve_access_check-3338408-2.patch"
+      },
+      "drupal/diff": {
+        "Issue #3348096: Fix Entity queries must explicitly set whether the query should be access checked or not in Diff":
+        ""
       }
     }
   }
diff --git a/modules/varbase_default_content/varbase_default_content.install b/modules/varbase_default_content/varbase_default_content.install
index 4f93ff29..6f0027e5 100644
--- a/modules/varbase_default_content/varbase_default_content.install
+++ b/modules/varbase_default_content/varbase_default_content.install
@@ -27,7 +27,7 @@ function varbase_default_content_install() {
   try {
     $path_alias_query = \Drupal::entityQuery('path_alias');
     $path_alias_query->condition('alias', '/node', '=');
-    $alias_ids = $path_alias_query->execute();
+    $alias_ids = $path_alias_query->accessCheck(FALSE)->execute();
 
     if (count($alias_ids) > 0) {
       foreach ($alias_ids as $alias_id) {
-- 
GitLab