If a module is not present in filesystem but is present and enabled in database (system.status == 1)
Any attempt to enable or disable any other existent module will produce a WD message:
- Illegal choice in status element.
And drush exits with non zero return code, although the operation is completed, it is not possible to use drush in scripts because of the non zero return code.
Thanks
Alexandrezia

Comments

moshe weitzman’s picture

Category: bug » support
Status: Active » Fixed

That sounds like drupal is throwing an error with drupal_set_message('foo', 'error') and drush is faithfully recording the error. You need to complain to the author of the code that is throwing the error. I can't tell if that is Drupal core or a contrib module from your description. It looks like core form api. Either way, drush is just following orders here.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

elijah lynn’s picture

This is happening to me because I am on my local environment and using git. Say I am working on the branch feature/blog that has a Feature in it and then I want to switch to the develop branch to install a module that really has nothing to do with the blog. I switch, dl & en the module and then I get these errors. I put this here just to help someone else in the future who may not realize that this could be why they are getting this error.