I was under the impression that modules were only supposed to be enabled/uninstalled in Drupal 8, yet I have a custom module which is disabling itself randomly. Of course, it's a problem we cannot consistently reproduce, and it is frustratingly difficult to debug, because it doesn't happen on dev servers.

Is there somewhere which documents what can cause a module to become disabled? I thought this was supposed to be impossible, so I would think it would be only a few things.

The module reports Disabled when running drush pm-list. It is definitely reporting itself as disabled.

Is there a better way to debug, research why this is happening?

  • Are you sure it's disabled, rather than enabled but not working? – No Sssweat Oct 27 '17 at 20:11
  • Yes, it reports itself as disabled when running 'drush pm-list' – RaisinBranCrunch Oct 27 '17 at 20:26
  • 1
    Sound like you might have a collision in core.extension.yml between branches or enviroonments if you are using config management. Maybe someone forgot to export or commit the change so now whenever some automation runs it will disable the module. – user21641 Oct 28 '17 at 15:20
  • Is your test server the exact same as the production server? Meaning software versions, operating systems etc are same? – Beebee Oct 30 '17 at 14:04
  • It is the same with software/OS/etc., but it has extra caching layers, i.e. memcached & cloudfront. – RaisinBranCrunch Oct 31 '17 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.