database configuration is not supported by Drupal Reset

Created on 11 August 2023, 11 months ago
Updated 24 August 2023, 10 months ago

Trying to use 8.x-1.2-rc1 on a fresh Drupal 10.1.2 install.

Your database configuration is not supported by Drupal Reset. There must be one database (no master/slave) and the table prefix must be set to a string (not an array); use the empty string if you do not want a prefix. See your settings.php file.

I have only one database, and the prefix is set to an empty string.

What else should I check?

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @clemorphy
  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    The database needs to be called "default". For the actual code, see ::validateIsSupported().

  • Looking at validateIsSupported(), why does it look for $database['default']['prefix']['default']?
    Shouldn't it look for $database['default']['default']['prefix'] ?

  • Looking at

    validateIsSupported()

    it seems to look for $database['default']['prefix']['default'].
    Shouldn't it look for $database['default']['default']['prefix']?

    My db infos are defined like this :

    $databases['default']['default']['database'] = "db";
    $databases['default']['default']['username'] = "db";
    $databases['default']['default']['password'] = "db";
    $databases['default']['default']['host'] = $host;
    $databases['default']['default']['driver'] = $driver;
    $databases['default']['default']['port'] = $port;
    $databases['default']['default']['prefix'] = '';

    Drupal is ok with this, and it seems to be the recommended format.

  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    Yes, it looks like it is not checking correctly. I would welcome a patch to fix it.

    It should allow for the prefix setting to be either empty or a string. Look at default.settings.php as it comes from Drupal core and configure your site to use $databases exactly as it appears there, but with your config, and then make it work with that.

  • πŸ‡³πŸ‡±Netherlands Web-Beest

    I've created a patch that fixes the compatibility check and the dropDatabase command.

  • Status changed to Needs work 10 months ago
  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    Thanks for the patch.

    It should be OK for the prefix to not be set.

Production build 0.69.0 2024