To update a site locally, I cloned the code base with git to my local computer and imported the database, then ran "composer update --with-dependencies", there were no errors, then I went to /web directory and ran "drush updb -y", it showed me 8 missing modules:
The following module is missing from the file system: add_to_head [warning]
bootstrap.inc:276
The following module is missing from the file system: context [warning]
bootstrap.inc:276
The following module is missing from the file system: context_ui [warning]
bootstrap.inc:276
The following module is missing from the file system: libraries [warning]
bootstrap.inc:276
The following module is missing from the file system: menu_target [warning]
bootstrap.inc:276
The following module is missing from the file system: panelizer [warning]
bootstrap.inc:276
The following module is missing from the file system: phpmailer [warning]
bootstrap.inc:276
The following module is missing from the file system: site_verify [warning]
bootstrap.inc:276
The following module is missing from the file system: [warning]
special_menu_items bootstrap.inc:276
No database updates required [success]
I tried to log in to the local site, but first ran "drush pm-uninstall captcha", but the site returned the white screen and:
"The website encountered an unexpected error. Please try again later."
I thought that the problem was due to the missing modules and started running "composer require" for each of them. But they either didn't get installed or returned:
Using version ^3.0@beta for drupal/phpmailer
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating drupal/phpmailer (dev-3.x 950f2af => 3.0.0-beta2): Update failed (The .git directory is missing from web/modules/contrib/phpmailer, see https://getcomposer.org/commit-deps for more information)
Would you like to try reinstalling the package instead [yes]? yes
- Removing drupal/phpmailer (dev-3.x)
- Installing drupal/phpmailer (3.0.0-beta2): Cloning 8.x-3.0-beta2 from cache
Writing lock file
Generating autoload files
> DrupalProject\composer\ScriptHandler::createRequiredFiles
I don't what else to do. Is the "unexpected error" caused by those missing modules? What should I do to fix it?
UPDATE: I looked at /admin/reports/dblog and here's the php error I saw:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 201 of /sites/bak/web/core/lib/Drupal/Core/Routing/RouteProvider.php).
composer install
after composer require" for each of them.drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name='your_module';"
for each of them .