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
- Install a website using the minimal profile
- Uninstall the Dblog module
- Export the configuration
- Drop the database
- Install the website using web interface
- Select "use existing config"
- 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
- Identify why the dblog logger service is detected during the installation of a profile without dblog
- provide a fix
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
Should not be needed.
| Comment | File | Size | Author |
|---|---|---|---|
| Capture d’écran de 2022-10-05 16-16-45.png | 529.6 KB | grimreaper |
Comments
Comment #2
grimreaperFor 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.
Comment #4
quietone commented@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!