Submitted by admin on Tue, 03/10/2020 - 18:50
Drupal 8 website keeps redirecting to /core/install.php with error, with an error: Fatal error: Cannot redeclare _drupal_shutdown_function_handle_exception() (previously declared in... (the following instances):
.../html/web/core/includes/bootstrap.inc
and another instance in
.../html/vendor/drupal/core/includes/bootstrap.inc
For some reason, it seemed to be a problem caused during the installation using composer, or a mix-up in the use of composer to install the D8 website. It seems the presence of core in the vendor directory is forcing the install redirect. To fix this:
- deleted the core directory (sub-folder) inside /html/vendor/drupal/
- in Drush, run the composer update command, which will now detect a missing composer.json at core, and will use the one provided at the /html/ web root location
- The same composer update command, will now clean-up the vendor directory and regenerate all necessary Drupal core files and fix the issue
- In Drush, run drush cache:rebuild to clear all cache. If an error appears related to some contrib module, just do the same cache rebuild again
Leave a Comment