From 4524b3fe1969bca58590ed6c747cc3aee5a721a1 Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Mon, 28 Oct 2024 14:11:01 -0400 Subject: [PATCH 1/5] BSD fixes #318: Allow 300 MB files to be uploaded. --- .platform/applications.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.platform/applications.yaml b/.platform/applications.yaml index 8d6128a6..80f84a3e 100644 --- a/.platform/applications.yaml +++ b/.platform/applications.yaml @@ -32,8 +32,8 @@ bixalcom: env: N_PREFIX: /app/.global php: - post_max_size: '90M' - upload_max_filesize: '90M' + post_max_size: '300M' + upload_max_filesize: '300M' # The relationships of the application with services or other applications. # From c26402de3278822bbccde4572ecbd018782ce38f Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Mon, 28 Oct 2024 14:11:36 -0400 Subject: [PATCH 2/5] BSD fixes #318: Allow images and pdfs to be 100 MB and videos to be 300 MB. --- config/sync/field.field.media.image.field_media_image.yml | 2 +- config/sync/field.field.media.pdf.field_media_file.yml | 2 +- config/sync/field.field.media.video.field_media_video_file.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/sync/field.field.media.image.field_media_image.yml b/config/sync/field.field.media.image.field_media_image.yml index a27e2632..90794bb8 100644 --- a/config/sync/field.field.media.image.field_media_image.yml +++ b/config/sync/field.field.media.image.field_media_image.yml @@ -22,7 +22,7 @@ settings: handler_settings: { } file_directory: '[date:custom:Y]-[date:custom:m]' file_extensions: 'png gif jpg jpeg svg webp' - max_filesize: '' + max_filesize: '100 MB' max_resolution: '' min_resolution: '' alt_field: true diff --git a/config/sync/field.field.media.pdf.field_media_file.yml b/config/sync/field.field.media.pdf.field_media_file.yml index 4f9c405c..b18c9547 100644 --- a/config/sync/field.field.media.pdf.field_media_file.yml +++ b/config/sync/field.field.media.pdf.field_media_file.yml @@ -22,6 +22,6 @@ settings: handler_settings: { } file_directory: '[date:custom:Y]-[date:custom:m]' file_extensions: pdf - max_filesize: '' + max_filesize: '100 MB' description_field: true field_type: file diff --git a/config/sync/field.field.media.video.field_media_video_file.yml b/config/sync/field.field.media.video.field_media_video_file.yml index a30a3dbc..9b324e48 100644 --- a/config/sync/field.field.media.video.field_media_video_file.yml +++ b/config/sync/field.field.media.video.field_media_video_file.yml @@ -22,6 +22,6 @@ settings: handler_settings: { } file_directory: '[date:custom:Y]-[date:custom:m]' file_extensions: 'mp4 webm' - max_filesize: '' + max_filesize: '300 MB' description_field: false field_type: file From 2d3ff2d05a0cb81048c3531d23cf2b3132f130c0 Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Mon, 28 Oct 2024 14:12:40 -0400 Subject: [PATCH 3/5] BSD fixes #318: Update request buffering for platform. --- .platform/applications.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.platform/applications.yaml b/.platform/applications.yaml index 80f84a3e..1f6c5615 100644 --- a/.platform/applications.yaml +++ b/.platform/applications.yaml @@ -161,10 +161,10 @@ bixalcom: # Redirect any incoming request to Drupal's front controller. passthru: '/index.php' - # Allow 90M files to be uploaded. + # Allow 300M files to be uploaded. request_buffering: enabled: true - max_request_size: 100m + max_request_size: 320m # Deny access to all static files, except those specifically allowed below. allow: false From fa08f47841c9a85e234b2e932f70e66b6265526c Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Mon, 28 Oct 2024 14:12:57 -0400 Subject: [PATCH 4/5] BSD fixes #318: Make Lando upload settings match platform. --- lando-config/php.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lando-config/php.ini b/lando-config/php.ini index 2cfc1a4b..0ccd0f41 100644 --- a/lando-config/php.ini +++ b/lando-config/php.ini @@ -3,3 +3,5 @@ ; only critical errors and suppresses these connection errors. ; https://xdebug.org/docs/all_settings#XDEBUG_CONFIG ;xdebug.log_level=0 +post_max_size=300M +upload_max_filesize=300M From 028718bdd75cd7412a87d159bb295f2b945029d7 Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Tue, 29 Oct 2024 16:47:21 -0400 Subject: [PATCH 5/5] BSD fixes #318: Dont error out if drush cr breaks. Check that redis and memcache have already been defined. --- orch/deploy_install.sh | 4 ++-- web/sites/default/settings.memcache.php | 3 ++- web/sites/default/settings.redis.php | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/orch/deploy_install.sh b/orch/deploy_install.sh index b9e0fc25..11366530 100755 --- a/orch/deploy_install.sh +++ b/orch/deploy_install.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash -set -e - ./orch/show_file.sh $0 # Normally, XDEBUG_MODE=debug,develop but develop breaks the Drupal installation. @@ -12,6 +10,8 @@ fi drush cr +set -e + # If using Postgres, enable the pg_trgm extension which is required before # Drupal is installed. if [ -n "$(drush status | grep pgsql 2>/dev/null)" ]; then diff --git a/web/sites/default/settings.memcache.php b/web/sites/default/settings.memcache.php index 8796e2c8..ff476ad3 100644 --- a/web/sites/default/settings.memcache.php +++ b/web/sites/default/settings.memcache.php @@ -5,7 +5,8 @@ if (( !InstallerKernel::installationAttempted() && (extension_loaded('memcached') || extension_loaded('memcache')) && - file_exists($app_root . '/modules/contrib/memcache') + file_exists($app_root . '/modules/contrib/memcache') && + !function_exists('_settings_memcache') )) { function _settings_memcache(array &$settings, string $host): void { $settings['memcache']['servers'][$host] = 'default'; diff --git a/web/sites/default/settings.redis.php b/web/sites/default/settings.redis.php index 29ed533d..33ce67e7 100644 --- a/web/sites/default/settings.redis.php +++ b/web/sites/default/settings.redis.php @@ -5,7 +5,8 @@ if (( !InstallerKernel::installationAttempted() && extension_loaded('redis') && - class_exists('Drupal\redis\ClientFactory') + class_exists('Drupal\redis\ClientFactory') && + !function_exists('_settings_redis') )) { function _settings_redis(array &$settings, string $host, string $port): void { $settings['redis.connection']['host'] = $host;