From 18ccff76c9add94e015b3d0cee00bddee6a1e7df Mon Sep 17 00:00:00 2001 From: Mark Conroy Date: Mon, 8 Jul 2024 14:48:56 +0100 Subject: [PATCH 1/3] enables localgov_base_helper module --- localgov.info.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/localgov.info.yml b/localgov.info.yml index 78dda7f..7017959 100644 --- a/localgov.info.yml +++ b/localgov.info.yml @@ -55,6 +55,7 @@ install: - localgov_services:localgov_services_navigation - localgov_services:localgov_services_page - localgov_services:localgov_services_sublanding + - localgov_base:localgov_base_helper dependencies: - localgov_core:localgov_core From 232fd146563c30179e9a15f103840805c056813f Mon Sep 17 00:00:00 2001 From: ekes Date: Wed, 25 Sep 2024 19:00:20 +0200 Subject: [PATCH 2/3] Add version for LocalGov base, and enable the module requirement that comes with it. See https://github.com/localgovdrupal/localgov_base/issues/624 --- composer.json | 2 +- localgov.info.yml | 2 +- localgov.install | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2c383d0..f5158fd 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "drupal/search_api": "^1.21", "drush/drush": ">=10", "localgovdrupal/localgov_alert_banner": "^1.2.0", - "localgovdrupal/localgov_base": "^1.3.1", + "localgovdrupal/localgov_base": "^1.7.0", "localgovdrupal/localgov_core": "^2.12.0", "localgovdrupal/localgov_demo": "^3.0@alpha", "localgovdrupal/localgov_directories": "^3.0", diff --git a/localgov.info.yml b/localgov.info.yml index 7017959..9075c2b 100644 --- a/localgov.info.yml +++ b/localgov.info.yml @@ -63,5 +63,5 @@ dependencies: themes: - claro - gin - - localgov_base + - localgov_base (>=1.7.0) - localgov_scarfolk diff --git a/localgov.install b/localgov.install index 347addf..a17076e 100644 --- a/localgov.install +++ b/localgov.install @@ -101,3 +101,18 @@ function localgov_update_9503() { } } } + +/** + * Update existing sites to enable the theme dependency module for base. + */ +function localgov_update_9504() { + // The theme dependency should have caused the module to exist, but lets not + // fail if it's not there, as this is just a helper. The theme will continue + // to work when updated later, but report the requirement. + if (\Drupal::service('theme_handler')->themeExists('localgov_base')) { + if (\Drupal::service('module_installer')->install(['localgov_base_helper'])) { + return t('Base theme helper module enabled.'); + } + return t('LocalGov Base theme will require the LocalGov Base Helper module. Enable it manually when upgrading to version 1.7.0 or higher.'); + } +} From d8cf98d066bdb8d81121b52640d87fc63ae7df68 Mon Sep 17 00:00:00 2001 From: ekes Date: Wed, 25 Sep 2024 19:13:18 +0200 Subject: [PATCH 3/3] Cursory testing suggests we can't add a version requirements here like with a module. --- localgov.info.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localgov.info.yml b/localgov.info.yml index 9075c2b..7017959 100644 --- a/localgov.info.yml +++ b/localgov.info.yml @@ -63,5 +63,5 @@ dependencies: themes: - claro - gin - - localgov_base (>=1.7.0) + - localgov_base - localgov_scarfolk