diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 6e271d5..7eebe66 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -996,7 +996,10 @@ function install_base_system(&$install_state) { // created by this point in the installer, since Drupal creates them during // the install_verify_requirements() task. Note that we cannot call // file_ensure_access() any earlier than this, since it relies on - // system.module in order to work. + // system.module in order to work. Flush stream wrapper plugins to make sure + // that we correctly discovered all stream wrapper plugins. + \Drupal::service('plugin.manager.stream_wrapper')->clearCachedDefinitions(); + file_get_stream_wrappers(); file_ensure_htaccess(); // Enable the user module so that sessions can be recorded during the diff --git a/core/modules/system/lib/Drupal/system/Form/FileSystemForm.php b/core/modules/system/lib/Drupal/system/Form/FileSystemForm.php index d9cc47c..fad6b81 100644 --- a/core/modules/system/lib/Drupal/system/Form/FileSystemForm.php +++ b/core/modules/system/lib/Drupal/system/Form/FileSystemForm.php @@ -124,6 +124,12 @@ public function submitForm(array &$form, array &$form_state) { $config->save(); parent::submitForm($form, $form_state); + + // Private stream wrapper will be hidden until path.pravte configuration + // value is set. Since we cache plugin information about stream wrappers we + // need to clear it's cache in case path.private was initially set on this + // submit. + \Drupal::service('plugin.manager.stream_wrapper')->clearCachedDefinitions(); } }