From 0ca3c8f946399da2d1398fa96c2953d77d390afa Mon Sep 17 00:00:00 2001 From: Ofer Shaal Date: Fri, 6 Dec 2019 10:01:47 -0500 Subject: [PATCH 1/6] Adding file_temp_path to settings per comment in https://www.drupal.org/project/drupal/releases/8.8.0 https://www.drupal.org/project/drupal/issues/3039026 --- defaults/install/drupal/settings.build-acquia.php | 2 +- defaults/install/drupal/settings.build.php | 1 + targets/the-build.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/install/drupal/settings.build-acquia.php b/defaults/install/drupal/settings.build-acquia.php index cb1c4e79..055ce6a7 100644 --- a/defaults/install/drupal/settings.build-acquia.php +++ b/defaults/install/drupal/settings.build-acquia.php @@ -10,7 +10,7 @@ $settings['file_public_path'] = '${drupal.site.settings.file_public_path}'; $settings['file_private_path'] = "/mnt/gfs/{$_ENV['AH_SITE_GROUP']}.{$_ENV['AH_SITE_ENVIRONMENT']}/files-private"; -$config['system.file']['path']['temporary'] = $_ENV['TEMP']; +$settings['file_temp_path'] = $_ENV['TEMP']; $settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; diff --git a/defaults/install/drupal/settings.build.php b/defaults/install/drupal/settings.build.php index 45cbd9be..28736bb2 100644 --- a/defaults/install/drupal/settings.build.php +++ b/defaults/install/drupal/settings.build.php @@ -22,6 +22,7 @@ $settings['file_public_path'] = '${drupal.site.settings.file_public_path}'; $settings['file_private_path'] = '${drupal.site.settings.file_private_path}'; +$settings['file_temp_path'] = '${drupal.site.settings.file_temp_path}'; // Enable/disable config_split configurations. To simulate other config split // environments, change "development" to either "staging" or "production", then run: diff --git a/targets/the-build.xml b/targets/the-build.xml index 53e0038f..5cc08e15 100644 --- a/targets/the-build.xml +++ b/targets/the-build.xml @@ -138,6 +138,7 @@ + From 46a9e60596ff597538ec1f18ab48b2699728489d Mon Sep 17 00:00:00 2001 From: Ofer Shaal Date: Fri, 6 Dec 2019 22:26:55 -0500 Subject: [PATCH 2/6] Fixing default file_temp_path, apply it for pantheon and platformsh --- defaults/install/drupal/settings.build-pantheon.php | 1 + defaults/install/drupal/settings.build-platformsh.php | 1 + targets/the-build.xml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/install/drupal/settings.build-pantheon.php b/defaults/install/drupal/settings.build-pantheon.php index 0639ce7a..8df566e9 100644 --- a/defaults/install/drupal/settings.build-pantheon.php +++ b/defaults/install/drupal/settings.build-pantheon.php @@ -6,6 +6,7 @@ */ $settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; +$settings['file_temp_path'] = '${drupal.site.settings.file_temp_path}'; // Enable/disable config_split configurations. if (isset($_ENV['PANTHEON_ENVIRONMENT'])) { diff --git a/defaults/install/drupal/settings.build-platformsh.php b/defaults/install/drupal/settings.build-platformsh.php index 43702a5a..452f8a97 100644 --- a/defaults/install/drupal/settings.build-platformsh.php +++ b/defaults/install/drupal/settings.build-platformsh.php @@ -6,6 +6,7 @@ */ $settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; +$settings['file_temp_path'] = '${drupal.site.settings.file_temp_path}'; // Enable/disable config_split configurations. if (isset($_ENV['PLATFORM_BRANCH'])) { diff --git a/targets/the-build.xml b/targets/the-build.xml index 5cc08e15..7c35d226 100644 --- a/targets/the-build.xml +++ b/targets/the-build.xml @@ -138,7 +138,7 @@ - + From 25336c43cd235e0be252b985e518ff5910fea19f Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 21 Jan 2020 16:42:59 -0600 Subject: [PATCH 3/6] Pantheon sets $settings['config_sync_directory'] in the platform-specific settings file we download from pantheon-systems/drops-8: https://github.com/pantheon-systems/drops-8/blob/default/sites/default/settings.pantheon.php --- defaults/install/drupal/settings.build-pantheon.php | 1 - 1 file changed, 1 deletion(-) diff --git a/defaults/install/drupal/settings.build-pantheon.php b/defaults/install/drupal/settings.build-pantheon.php index 8df566e9..0639ce7a 100644 --- a/defaults/install/drupal/settings.build-pantheon.php +++ b/defaults/install/drupal/settings.build-pantheon.php @@ -6,7 +6,6 @@ */ $settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; -$settings['file_temp_path'] = '${drupal.site.settings.file_temp_path}'; // Enable/disable config_split configurations. if (isset($_ENV['PANTHEON_ENVIRONMENT'])) { From 6dffb027f1c303d205fe34df61769baf9d73da87 Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 21 Jan 2020 16:45:49 -0600 Subject: [PATCH 4/6] For Platform.sh, the tmp directory is configured in .platform.app.yml, so update our Drupal settings to use that. --- defaults/install/drupal/settings.build-platformsh.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/install/drupal/settings.build-platformsh.php b/defaults/install/drupal/settings.build-platformsh.php index 452f8a97..ba04580e 100644 --- a/defaults/install/drupal/settings.build-platformsh.php +++ b/defaults/install/drupal/settings.build-platformsh.php @@ -6,7 +6,9 @@ */ $settings['config_sync_directory'] = '${drupal.site.config_sync_directory}'; -$settings['file_temp_path'] = '${drupal.site.settings.file_temp_path}'; + +// Use the temporary directory set up in .platform.app.yaml +$settings['file_temp_path'] = '/tmp'; // Enable/disable config_split configurations. if (isset($_ENV['PLATFORM_BRANCH'])) { From bc7d73e97584c116da1fb8428505481b977343f6 Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 21 Jan 2020 16:48:28 -0600 Subject: [PATCH 5/6] Use the standard /tmp directory on the development environment. --- defaults/install/drupal/settings.build.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/install/drupal/settings.build.php b/defaults/install/drupal/settings.build.php index 28736bb2..5287f758 100644 --- a/defaults/install/drupal/settings.build.php +++ b/defaults/install/drupal/settings.build.php @@ -22,7 +22,10 @@ $settings['file_public_path'] = '${drupal.site.settings.file_public_path}'; $settings['file_private_path'] = '${drupal.site.settings.file_private_path}'; -$settings['file_temp_path'] = '${drupal.site.settings.file_temp_path}'; + +// Use the standard temporary directory on the development environment (update if the +// project's development environment is configured differently). +$settings['file_temp_path'] = '/tmp'; // Enable/disable config_split configurations. To simulate other config split // environments, change "development" to either "staging" or "production", then run: From 29f285135229e445afd67ae698c92204916954df Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 21 Jan 2020 16:49:34 -0600 Subject: [PATCH 6/6] Don't provide a file_temp_path property, since different environments set this in different ways (e.g. Acquia uses an environment variable, which we couldn't put in this property). --- targets/the-build.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/targets/the-build.xml b/targets/the-build.xml index 7c35d226..53e0038f 100644 --- a/targets/the-build.xml +++ b/targets/the-build.xml @@ -138,7 +138,6 @@ -