I'm trying to load a production site in a dev environment using the site's codebase (core 8.3.7, contrib and custom modules and vendor folder) and the current database.

After struggling a bit with it, I managed to import the DB (it's PGSQL with a lot of extensions), and the site was up. I looked into the status report page and besides a few update warnings, there are no errors.

First time I try to clear cache, the site breaks and starts complaining about missing modules (one of them made sense, the other is the basic_auth module, which is in core). I manually cleaned up the missing one from the DB, but I'm getting a log of PluginNotFoundExceptions, which to me, says I must have done something wrong. I've tried importing the DB again and I traced the caching issues down to router cache and views cache. All of the other caches are cleaned with no issues, but these two throw the above exceptions.

I've tried to install the codebase again via composer, respecting the .lock file with composer update --lock, and it says there is nothing to install/update.

I'm a bit lost, and the only way I can make the site work (even if momentarily) is by importing the DB again, but it breaks after cache clearing and/or configurations being exported, either via drush or via backend.

AFAICT, even if the codebase was in fact missing something (ie, someone installed something in production not managed by composer), it would show up in the contrib folder and by importing the DB it should be fine, right?

Does anyone have some suggestions on where to start looking for the problem?

  • Did you install Drupal after importing the codebase and before importing the database?
    – Christia
    Commented Nov 9, 2017 at 10:46
  • Nope. I just copied the codebase and imported the DB right after it. should I have done anything else in between? I will now try emptying all cache tables in the DB right after import to check if it works.
    – Joum
    Commented Nov 9, 2017 at 10:50
  • Emptying the cache tables also does not work. The errors are still there. If I drush cr I get a PluginNotFoundException about a list plugin, related to the group module. Although, when I try accessing the site and the drush ws, I get the same exception but regarding a language plugin.
    – Joum
    Commented Nov 9, 2017 at 10:57
  • You need to actually install Drupal before importing your database into it. I hope this helps, cheers.
    – Christia
    Commented Nov 9, 2017 at 11:09
  • Can't install. The install script stops at the "Check requirements" stage, telling me to check the messages and try again, but no messages show up.
    – Joum
    Commented Nov 9, 2017 at 11:29

2 Answers 2


Are you sure there are no differences in the codebase? This would explain the issue. The plugins/routes are cached in the database until you clear the cache. Then they are rediscovered from the codebase and the missing plugins or routes become visible. It's not necessarily that the code is missing physically, it can also be a problem with autoloading.

If there is a problem with syncing the codebase by git/composer, use another tool, for example rsync. Make sure to sync the complete codebase, also the files in the root folder.

  • Thank you for your feedback. I just scp'ed the whole root folder contents to my local root folder. After that, I dropped the DB and created it again, using all the extensions being used by PGSQL in the production server. If, before importing the DB, I delete settings.php and try to install, I get a "list" plugin not found exception.
    – Joum
    Commented Nov 9, 2017 at 14:22
  • Right now, the only differences I can think of relate to the stack. The production server is using CentOS and I'm using Ubuntu 16.04 locally. When I tried composer update --lock locally I always get a "nothing to install or update" message and it then creates the autoloader again.
    – Joum
    Commented Nov 9, 2017 at 14:23
  • Delete all files and scp again (or use rsync --delete), because not only missing files can cause problems, also leftover files from older versions.
    – 4uk4
    Commented Nov 9, 2017 at 14:32
  • That was exactly my first procedure for exactly those reasons, sorry I wasn't clear on that aspect. :)
    – Joum
    Commented Nov 9, 2017 at 14:34

Had a very similar issue with a missing "list" plugin on D8.4.2. I discovered that my issue was caused by an OSX update to 10.13.1 which seriously messed with my vagrant/virtual box/composer/drupalvm local environment. My files were not syncing between host and guest machines apparently caused by some issues with NFS. One indication of this issue is that I had missing modules on the module list page.

Here is a link to where I found my solution: https://github.com/geerlingguy/drupal-vm/issues/1547

Ultimately, the fix was upgrading to 10.13.2 beta, then I deleted core and contrib modules manually and ran composer update to replace. I had no issues with the beta version of OSX.

Hope this helps.

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.