2

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).

4
  • Try to run composer install after composer require" for each of them.
    – berramou
    Commented Oct 20, 2018 at 11:39
  • if you don't need those modules you wanna just remove the warning, you can try drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name='your_module';" for each of them .
    – berramou
    Commented Oct 20, 2018 at 11:40
  • composer install doesn't help. It returns "Nothing to install or update". Also, when I ran "composer require drupal/add_to_head" and then "drush updb -y" it returned that add_to_head were still missing.
    – Rusletov
    Commented Oct 20, 2018 at 11:52
  • Do you see the modules in web/modules/contrib?
    – Lambic
    Commented Dec 7, 2021 at 14:33

4 Answers 4

0

I faced Same error before so what you have to do is for example let's say it is panelizer.

The following module is missing from the file system: panelizer [warning]bootstrap.inc:276

1) use composer and say composer require drupal/panelizer in the terminal.

2)After installing the module now try to uninstall the module right away using the command below

drush pm-uninstall panelizer

Now go to your site and do following operations. Configuration>Development>Performance and now do the Clear-Cache. If you come back to your site you will not find an error.

0

I managed to solve this issue by executing the following steps:

  • composer clear-cache
  • rm -r vendor/
  • rm -r web/sites/modules/contrib
  • composer install
-1

Remove your Composer lock file and run following command in sequence:

  • composer clear-cache
  • composer install
  • composer require Drupal/module
-1

Remove your Composer lock, vendor folder and run 'composer install' again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.