From b61518317485cea264efb8d808f53ebc2bf6eb61 Mon Sep 17 00:00:00 2001
From: Rajab Natshah <rajabn@gmail.com>
Date: Thu, 19 Dec 2019 14:04:16 +0200
Subject: [PATCH] Issue #3102065: Add a necessary initialization for the entire
 system to account for changed config by the end of the installation

---
 varbase.profile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/varbase.profile b/varbase.profile
index b6b57096..540a1926 100644
--- a/varbase.profile
+++ b/varbase.profile
@@ -458,6 +458,26 @@ function varbase_after_install_finished(array &$install_state) {
     $config_factory->setData($config_data)->save(TRUE);
   }
 
+  // Entity updates to clear up any mismatched entity and/or field definitions
+  // And Fix changes were detected in the entity type and field definitions.
+  \Drupal::classResolver()
+    ->getInstanceFromDefinition(VarbaseEntityDefinitionUpdateManager::class)
+    ->applyUpdates();
+
+  // Full flash and clear cash and rebuilding newly created routes.
+  // After install of extra modules by install: in the .info.yml files.
+  // In Varbase profile and all Varbase components.
+  // ---------------------------------------------------------------------------
+  // * Necessary inlitilization for the entire system.
+  // * Account for changed config by the end install.
+  // * Flush all persistent caches.
+  // * Flush asset file caches.
+  // * Wipe the Twig PHP Storage cache.
+  // * Rebuild module and theme data.
+  // * Clear all plugin caches.
+  // * Rebuild the menu router based on all rebuilt data.
+  drupal_flush_all_caches();
+
   global $base_url;
 
   // After install direction.
-- 
GitLab