Database installation problem is badly formed and crashes a badly configured functional test

Created on 21 April 2021, over 3 years ago
Updated 3 October 2023, 11 months ago

Problem/Motivation

The installer requirements error that says:

> Resolve all issues below to continue the installation. For help configuring your database server, see the installation handbook , or contact your hosting provider.

appears to be badly formed, as it crashes a functional test with:

Undefined index: value

web/core/includes/install.core.inc:2299
web/core/includes/install.core.inc:1082
web/core/includes/install.core.inc:695
web/core/includes/install.core.inc:570
web/core/includes/install.core.inc:118

Steps to reproduce

Run any functional test with phpunit set up with bad database settings, or with MySQL not running.

Proposed resolution

The test should correctly report the problem rather than crash with a PHP error.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Closed: outdated

Version

9.5

Component
Install 

Last updated 2 days ago

No maintainer
Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia acbramley

    Looks like this has already been fixed elsewhere. If I muddle up SIMPLETEST_DB and run a random contrib test I get

    1) Drupal\Tests\workbench_access\Functional\ViewsUserOutputTest::testFieldOutput
    Drupal\Core\Installer\Exception\InstallerException: Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="https://www.drupal.org/docs/installing-drupal">installation handbook</a>, or contact your hosting provider.<ul><li>Failed to connect to your database server. The server reports the following message: <em class="placeholder">SQLSTATE[HY000] [1044] Access denied for user &#039;asd&#039;@&#039;%&#039; to database &#039;locaasdasdasdl&#039;</em>.<ul><li>Is the database server running?</li><li>Does the database exist or does the database user have sufficient privileges to create the database?</li><li>Have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname and port number?</li></ul></li></ul>
    
    /data/app/core/includes/install.core.inc:969
    /data/app/core/includes/install.core.inc:616
    /data/app/core/includes/install.core.inc:569
    /data/app/core/includes/install.core.inc:119
    /data/app/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:290
    /data/app/core/tests/Drupal/Tests/BrowserTestBase.php:552
    /data/app/core/tests/Drupal/Tests/BrowserTestBase.php:367
    /data/app/modules/contrib/workbench_access/tests/src/Functional/ViewsUserOutputTest.php:96
    /data/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    

    I can't recall or find the exact issue but I think this is outdated. If it's not, please post more specific steps to reproduce. Thanks!

Production build 0.71.5 2024