Problem/Motivation

When installing a website in the web UI, and using existing configuration, if in the existing configuration Dblog is uninstalled, then there is a fatal error:

The website encountered an unexpected error. Please try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.watchdog' doesn't exist: INSERT INTO "watchdog" ("uid", "type", "message", "variables", "severity", "link", "location", "referer", "hostname", "timestamp") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => cron [:db_insert_placeholder_2] => Starting execution of @module_cron(). [:db_insert_placeholder_3] => a:1:{s:7:"@module";s:7:"comment";} [:db_insert_placeholder_4] => 6 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => https://web.docker.localhost/core/install.php/?existing_config=1&langcode=en&profile=minimal&rewrite=ok [:db_insert_placeholder_7] => https://web.docker.localhost/core/install.php?rewrite=ok&langcode=en&existing_config=1&profile=minimal [:db_insert_placeholder_8] => ::1 [:db_insert_placeholder_9] => 1664968020 ) in Drupal\dblog\Logger\DbLog->log() (line 78 of core/modules/dblog/src/Logger/DbLog.php).
Drupal\dblog\Logger\DbLog->log(6, 'Starting execution of @module_cron().', Array) (Line: 103)
Drupal\dblog\Logger\DbLog->log(6, 'Starting execution of @module_cron().', Array) (Line: 127)
Drupal\Core\Logger\LoggerChannel->log(6, 'Starting execution of @module_cron().', Array) (Line: 114)
Drupal\Core\Logger\LoggerChannel->info('Starting execution of @module_cron().', Array) (Line: 235)
Drupal\Core\Cron->Drupal\Core\{closure}(Object, 'comment') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('cron', Object) (Line: 257)
Drupal\Core\Cron->invokeCronHandlers() (Line: 136)
Drupal\Core\Cron->run() (Line: 75)
Drupal\Core\ProxyClass\Cron->run() (Line: 1871)
install_finished(Array) (Line: 700)
install_run_task(Array, Array) (Line: 571)
install_run_tasks(Array, NULL) (Line: 119)
install_drupal(Object) (Line: 48)
require('/project/app/core/install.php') (Line: 4)

While there is no error when reinstalling using Drush.

Steps to reproduce

  1. Install a website using the minimal profile
  2. Uninstall the Dblog module
  3. Export the configuration
  4. Drop the database
  5. Install the website using web interface
  6. Select "use existing config"
  7. On the last stage, after entering maintenance compte credentials, you obtain the error in screenshot

Obtained on Core 9.4.7.

Proposed resolution

Be able to install a website from existing config and without Dblog.

Remaining tasks

  1. Identify why the dblog logger service is detected during the installation of a profile without dblog
  2. provide a fix

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

Should not be needed.

Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

For the record, I encountered this issue while investigating for #3304778: Missing required data for configuration: x because I otherwise almost never use the web UI to do installations.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Active » Closed (cannot reproduce)
Issue tags: +Bug Smash Initiative

@Grimreaper, thanks for the report.

I tested this on 9.5.x and 10.1.x, following the steps in the issue summary. In both cases, the install worked without error. I do see that that image has Drupal 1.0.0, which is not a Drupal Version string. Was there perhaps some contrib or custom code involved?

Therefore, closing as cannot reproduce.

If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").

Thanks!