Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation breaks when choosing a different language than english. #59

Open
markaspot opened this issue Feb 2, 2018 · 6 comments
Open
Assignees

Comments

@markaspot
Copy link
Owner

Installing via drush and choosing english as language in the web installer works fine. Choosing another language lets the web installer fail with a "Drupal is already installed" error.

@markaspot markaspot self-assigned this Feb 2, 2018
@markaspot
Copy link
Owner Author

Tracing this behaviour leads to the following error:

RuntimeException: Failed to start the session because headers have already been sent by "/app/vendor/symfony/http-foundation/Response.php" at line 412. in /app/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 139 #0 /app/web/core/lib/Drupal/Core/Session/SessionManager.php(163): Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() #1 /app/web/core/lib/Drupal/Core/Session/SessionManager.php(118): Drupal\Core\Session\SessionManager->startNow() #2 /app/vendor/symfony/http-foundation/Session/Session.php(71): Drupal\Core\Session\SessionManager->start() #3 /app/web/core/includes/install.core.inc(1482): Symfony\Component\HttpFoundation\Session\Session->start() #4 /app/web/core/includes/install.core.inc(671): install_bootstrap_full(Array) #5 /app/web/core/includes/install.core.inc(549): install_run_task(Array, Array) #6 /app/web/core/includes/install.core.inc(117): install_run_tasks(Array) #7 /app/web/core/install.php(44): install_drupal(Object(Composer\Autoload\ClassLoader))

@markaspot
Copy link
Owner Author

This error can be reproduced only by choosing a different language

  1. Empty the database
  2. Run the installer again with the same language:

Result: Installationprocess starts as usual.

  1. Empty the database.
  2. Choose another "non-english" language.
    Result: Error can be reproduced.

@markaspot
Copy link
Owner Author

This has to be tested with a normal installer. Distros like Mark-a-Spot or Open Social skip the standard profile selector.

markaspot added a commit to markaspot/markaspot that referenced this issue Feb 4, 2018
@markaspot
Copy link
Owner Author

By using the distribution key in the distro.info.yml file, the installer starts directly installing and downloading the translation. It seems that the immediate request for the translation files is causing the error.
web/core/includes/install.core.inc:1243

// Check for a distribution profile.
  foreach ($install_state['profiles'] as $profile) {
    $profile_info = install_profile_info($profile->getName());
    if (!empty($profile_info['distribution'])) {
      return $profile->getName();
    }
  }

@Crell
Copy link

Crell commented Feb 5, 2018

Interesting. Good sleuthing! This sounds like it's worth opening a core bug about; even if the fix isn't in core (although I suspect it is), it's good to get the issue raised there and a broader audience may have more ideas on how to fix it.

@markaspot
Copy link
Owner Author

Thanks for your support, Larry. Your reference to the Open Social distro got me on the right track. We should reference this bug in their queue, too. Core Issue opened: https://www.drupal.org/project/drupal/issues/2942369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants