Verified Commit c07df939 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3445791 by balsama, phenaproxima: Language module...

Issue #3445791 by balsama, phenaproxima: Language module hook_modules_installed should account for sites with no installation profile now that it is possible to install a site from a recipe

(cherry picked from commit b4f1d1a3)
parent a6b7ab73
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -298,10 +298,10 @@ function language_modules_installed($modules, $is_syncing) {
  }

  if (!in_array('language', $modules)) {
    if (InstallerKernel::installationAttempted()) {
    if (InstallerKernel::installationAttempted() && $profile = \Drupal::installProfile()) {
      // If the install profile provides its own language.types configuration do
      // not overwrite it.
      $profile_directory = \Drupal::service('extension.list.profile')->getPath(\Drupal::installProfile());
      $profile_directory = \Drupal::service('extension.list.profile')->getPath($profile);
      $profile_storages = [
        new FileStorage($profile_directory . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY),
        new FileStorage($profile_directory . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY),