From 35d08cc6ed45139c7970bb67dca534dcf17a97e9 Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:16:32 -0600 Subject: [PATCH 1/8] Update trash.settings.yml Added `node` back to entity types. --- config/install/trash.settings.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/install/trash.settings.yml b/config/install/trash.settings.yml index 4dc4a31..f8b9d59 100644 --- a/config/install/trash.settings.yml +++ b/config/install/trash.settings.yml @@ -1,4 +1,5 @@ -enabled_entity_types: { } +enabled_entity_types: + node: { } auto_purge: enabled: false after: '30 days' From 84c32149dfbe50dc9db4d7fa1a3bec294db071d1 Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:43:52 -0600 Subject: [PATCH 2/8] Update boulder_profile.install Add post install hook like administer user by role so that trash.settings is rerun after all the content types have been installed. --- boulder_profile.install | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/boulder_profile.install b/boulder_profile.install index 802b7d8..2a67509 100644 --- a/boulder_profile.install +++ b/boulder_profile.install @@ -22,6 +22,8 @@ function boulder_profile_install() { _boulder_profile_install_shortcuts(); _boulder_profile_install_administerusersbyrole_settings(); _boulder_profile_install_webform_settings(); + // Enable trash last so entity schema updates run after all modules exist. + _boulder_profile_install_trash_settings(); } /** @@ -196,3 +198,14 @@ function _boulder_profile_install_webform_settings() { $htmlEditorSettings['element_format'] = $htmlEditorSettings['mail_format'] = 'wysiwyg'; $settings->set('html_editor', $htmlEditorSettings)->save(); } + +/** + * Enables Trash for configured entity types using profile settings. + **/ +function _boulder_profile_install_trash_settings() { + $profilePath = \Drupal::getContainer()->get('extension.path.resolver')->getPath('profile', 'boulder_profile'); + $settingsYaml = Yaml::parse(file_get_contents($profilePath . '/config/install/trash.settings.yml')); + \Drupal::configFactory()->getEditable('trash.settings') + ->setData($settingsYaml) + ->save(); +} From aafa82302b338e11325bbd2154776637e039828b Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Thu, 6 Aug 2026 13:06:59 -0600 Subject: [PATCH 3/8] Load order change Change load order for settings placement. --- boulder_profile.install | 12 +++++------- config/install/trash.settings.yml | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/boulder_profile.install b/boulder_profile.install index 2a67509..2ea70b7 100644 --- a/boulder_profile.install +++ b/boulder_profile.install @@ -22,7 +22,6 @@ function boulder_profile_install() { _boulder_profile_install_shortcuts(); _boulder_profile_install_administerusersbyrole_settings(); _boulder_profile_install_webform_settings(); - // Enable trash last so entity schema updates run after all modules exist. _boulder_profile_install_trash_settings(); } @@ -200,12 +199,11 @@ function _boulder_profile_install_webform_settings() { } /** - * Enables Trash for configured entity types using profile settings. - **/ + * Installs Trash contrib module settings. + */ function _boulder_profile_install_trash_settings() { - $profilePath = \Drupal::getContainer()->get('extension.path.resolver')->getPath('profile', 'boulder_profile'); + $profilePath = Drupal::getContainer()->get('extension.path.resolver')->getPath('profile', 'boulder_profile'); $settingsYaml = Yaml::parse(file_get_contents($profilePath . '/config/install/trash.settings.yml')); - \Drupal::configFactory()->getEditable('trash.settings') - ->setData($settingsYaml) - ->save(); + $settingsYaml['enabled_entity_types'] = ['node' => []]; + \Drupal::configFactory()->getEditable('trash.settings')->setData($settingsYaml)->save(); } diff --git a/config/install/trash.settings.yml b/config/install/trash.settings.yml index f8b9d59..4dc4a31 100644 --- a/config/install/trash.settings.yml +++ b/config/install/trash.settings.yml @@ -1,5 +1,4 @@ -enabled_entity_types: - node: { } +enabled_entity_types: { } auto_purge: enabled: false after: '30 days' From 52e7f8f77bd45b99d377a804cb384e8e3b3f9c55 Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:26:52 -0600 Subject: [PATCH 4/8] 14 day auto purge Add auto purge for 14 days to the settings, re-enable node --- boulder_profile.install | 12 ++++++++---- config/install/trash.settings.yml | 7 ++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/boulder_profile.install b/boulder_profile.install index 2ea70b7..508f6c3 100644 --- a/boulder_profile.install +++ b/boulder_profile.install @@ -202,8 +202,12 @@ function _boulder_profile_install_webform_settings() { * Installs Trash contrib module settings. */ function _boulder_profile_install_trash_settings() { - $profilePath = Drupal::getContainer()->get('extension.path.resolver')->getPath('profile', 'boulder_profile'); - $settingsYaml = Yaml::parse(file_get_contents($profilePath . '/config/install/trash.settings.yml')); - $settingsYaml['enabled_entity_types'] = ['node' => []]; - \Drupal::configFactory()->getEditable('trash.settings')->setData($settingsYaml)->save(); + \Drupal::configFactory()->getEditable('trash.settings') + ->set('enabled_entity_types', ['node' => []]) + ->set('auto_purge', [ + 'enabled' => TRUE, + 'after' => '14 days', + ]) + ->set('compact_overview', FALSE) + ->save(); } diff --git a/config/install/trash.settings.yml b/config/install/trash.settings.yml index 4dc4a31..182d68c 100644 --- a/config/install/trash.settings.yml +++ b/config/install/trash.settings.yml @@ -1,5 +1,6 @@ -enabled_entity_types: { } +enabled_entity_types: + node: { } auto_purge: - enabled: false - after: '30 days' + enabled: true + after: '14 days' compact_overview: false From 1202d38f37a321c2d34813b988346dfa82b8350b Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:31:17 -0600 Subject: [PATCH 5/8] Remove fixed broken Oops turn these off because it's handled in the post install script --- config/install/trash.settings.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config/install/trash.settings.yml b/config/install/trash.settings.yml index 182d68c..4dc4a31 100644 --- a/config/install/trash.settings.yml +++ b/config/install/trash.settings.yml @@ -1,6 +1,5 @@ -enabled_entity_types: - node: { } +enabled_entity_types: { } auto_purge: - enabled: true - after: '14 days' + enabled: false + after: '30 days' compact_overview: false From 49b3e3125058c27a2326a9736c1174d6260b7274 Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:37:45 -0600 Subject: [PATCH 6/8] Test 14 days already on Have 14 days already turned on but leave node empty. --- boulder_profile.install | 12 ++++-------- config/install/trash.settings.yml | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/boulder_profile.install b/boulder_profile.install index 508f6c3..2ea70b7 100644 --- a/boulder_profile.install +++ b/boulder_profile.install @@ -202,12 +202,8 @@ function _boulder_profile_install_webform_settings() { * Installs Trash contrib module settings. */ function _boulder_profile_install_trash_settings() { - \Drupal::configFactory()->getEditable('trash.settings') - ->set('enabled_entity_types', ['node' => []]) - ->set('auto_purge', [ - 'enabled' => TRUE, - 'after' => '14 days', - ]) - ->set('compact_overview', FALSE) - ->save(); + $profilePath = Drupal::getContainer()->get('extension.path.resolver')->getPath('profile', 'boulder_profile'); + $settingsYaml = Yaml::parse(file_get_contents($profilePath . '/config/install/trash.settings.yml')); + $settingsYaml['enabled_entity_types'] = ['node' => []]; + \Drupal::configFactory()->getEditable('trash.settings')->setData($settingsYaml)->save(); } diff --git a/config/install/trash.settings.yml b/config/install/trash.settings.yml index 4dc4a31..4bce18c 100644 --- a/config/install/trash.settings.yml +++ b/config/install/trash.settings.yml @@ -1,5 +1,5 @@ enabled_entity_types: { } auto_purge: - enabled: false - after: '30 days' + enabled: true + after: '14 days' compact_overview: false From f7c014ee312a092cbdda5295c0b1a44d5d1dc1c0 Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:46:13 -0600 Subject: [PATCH 7/8] Update boulder_profile.install add trash auto purge to double check the settings for 14 days. --- boulder_profile.install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/boulder_profile.install b/boulder_profile.install index 2ea70b7..f6a3f8f 100644 --- a/boulder_profile.install +++ b/boulder_profile.install @@ -204,6 +204,9 @@ function _boulder_profile_install_webform_settings() { function _boulder_profile_install_trash_settings() { $profilePath = Drupal::getContainer()->get('extension.path.resolver')->getPath('profile', 'boulder_profile'); $settingsYaml = Yaml::parse(file_get_contents($profilePath . '/config/install/trash.settings.yml')); - $settingsYaml['enabled_entity_types'] = ['node' => []]; - \Drupal::configFactory()->getEditable('trash.settings')->setData($settingsYaml)->save(); + \Drupal::configFactory()->getEditable('trash.settings') + ->set('enabled_entity_types', ['node' => []]) + ->set('auto_purge', $settingsYaml['auto_purge']) + ->set('compact_overview', $settingsYaml['compact_overview']) + ->save(); } From 05db2704e2553b76630d0f776d93dcca91588277 Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:51:15 -0600 Subject: [PATCH 8/8] Revert "Update boulder_profile.install" This reverts commit f7c014ee312a092cbdda5295c0b1a44d5d1dc1c0. --- boulder_profile.install | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/boulder_profile.install b/boulder_profile.install index f6a3f8f..2ea70b7 100644 --- a/boulder_profile.install +++ b/boulder_profile.install @@ -204,9 +204,6 @@ function _boulder_profile_install_webform_settings() { function _boulder_profile_install_trash_settings() { $profilePath = Drupal::getContainer()->get('extension.path.resolver')->getPath('profile', 'boulder_profile'); $settingsYaml = Yaml::parse(file_get_contents($profilePath . '/config/install/trash.settings.yml')); - \Drupal::configFactory()->getEditable('trash.settings') - ->set('enabled_entity_types', ['node' => []]) - ->set('auto_purge', $settingsYaml['auto_purge']) - ->set('compact_overview', $settingsYaml['compact_overview']) - ->save(); + $settingsYaml['enabled_entity_types'] = ['node' => []]; + \Drupal::configFactory()->getEditable('trash.settings')->setData($settingsYaml)->save(); }