Pantheon Community

Drush loses track of which modules are enabled

Can anyone help me figure out why drush complains about a module not being enabled even though it’s already enabled, and how to solve this problem permanently?

I’ve had this issue on several different platforms, and have never received a satisfactory answer.

For example:

$ drush migrate-manifest
Command migrate-manifest needs the following extension(s) enabled to run: migrate_manifest.     [error]
$ drush en migrate_manifest -y
migrate_manifest is already enabled.                                        [ok]
1 Like

Does it work after a drush cc drush?

it works after drush cc all
haven’t been able to reproduce reliably, but I will try cc drush next time

would like to be able to determine root cause though

@uberhacker or @greg may have insight here.

I will defer to @greg but drush cc drush usually fixes it for me. I have noticed this issue more on D8 than D7, fwiw. What is your version of drush @aaronbauman?

@aaronbauman Is it possible that you have two copies of the “migrate_manifest” module in your codebase? Duplicate modules in the code can cause issues, especially when they’re different versions, but even sometimes with the same version.

Have you seen this issue with lots of modules? Or just this one module?

drush cc drush or drush cr usually fixes it, but i’m running drush jobs during cron and it’s not practical to clear all the caches every 5 minutes.

I’ve seen this behavior with many different modules, only one version of them on the file system.