When running features-revert-all I get "Command features-revert-all needs the following module(s) enabled to run: features." even though features is active on my site. See enclosed image.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pvhee’s picture

Same issue here. Seems randomly,and sometimes clear cache solves the problem.

mpotter’s picture

Status: Active » Closed (cannot reproduce)

Was not able to reproduce this at all. What changes are you making to your site when you do this? As mentioned in #1 if it's a fresh install you probably need to clear cache so Drupal can find the modules that are installed before you revert your features.

michaelmallett’s picture

I often get this, I clear the caches and it generally tends to work. This, however causes a few issues if I have a field change or some other feature conflict

gaas’s picture

I see this quite often as well. If I run:

    drush cc all
    drush features-revert-all --yes

it does not fail. If I run:

    drush cc all
    drush updb --yes
    drush features-revert-all --yes

It fails even if drush updb appears to do nothing. The failure looks like:

Initialized Drupal 7.22 root directory at /tmp/site [notice]
Initialized Drupal site www.example.com at sites/www.example.com [notice]
Only variables should be passed by reference drush.php:152 [notice]
Command features-revert-all needs the following module(s) enabled to run: features. [error]
The drush command 'features-revert-all' could not be executed. [error]

Adding another 'drush cc all' between the 'updb' and 'features-revert-all' helps.

alberto56’s picture

Interesting, thanks. I have tried to reproduce this but for now it seems to be really intermittent. If someone finds a consistent way to reproduce, please reopen the issue.

treksler’s picture

Status: Closed (cannot reproduce) » Active

can reproduce

ran updb via drush on all sites
after that features-revert-revert-all fails

Command features-revert-all needs the following module(s) enabled to [error]
run: features.

treksler’s picture

Version: 7.x-1.0 » 7.x-2.0-beta1

for what it's worth, the database update added a column to one of the tables in the database

cc all does allow the features revert to proceed

treksler’s picture

problem is even worse

ran updb via drush on all sites
afterwards i get the following errors until i clear cache

The block Recent content was assigned to the invalid region dashboard_inactive and has been disabled.
The block Who's new was assigned to the invalid region dashboard_inactive and has been disabled.
The block Who's online was assigned to the invalid region dashboard_inactive and has been disabled.
The block Who's online (userone) was assigned to the invalid region dashboard_inactive and has been disabled.

this can happen if the hook_system_info_alter does not fire when rebuilding theme and module data

basically updb leaves the theme and the module registry in a broken state
this might be a bug in drush actually

treksler’s picture

i believe this is actually caused by https://drupal.org/node/602182 which will be fixed in drush 5.10 whenever it comes out

if anyone is having issues, try with the latest drush from git and report back

cheers

hefox’s picture

Status: Active » Closed (works as designed)

I cannot fathom that this is a features bug, and since treksler linked to a drush issue, marking this as closed

JohnAlbin’s picture

Status: Closed (works as designed) » Active

The drush bug mentioned in #9 was committed and pushed to 5.x and 6.x. However, with Drush 6.1, I'm still seeing this error.

I'm not trying to play the blame game, but this issue should be reopened until we can figure out where the bug lies.

Here's what I'm seeing:

$ drush fra
Command fra needs the following module(s) enabled to run: features.                      [error]
The drush command 'fra' could not be executed.                                           [error]
$ drush cc drush
'drush' cache was cleared                                                                [success]
$ drush fra
The following modules will be reverted: feature_1, feature_2
Do you really want to continue? (y/n): y
Command features-revert needs the following module(s) enabled to run: features.          [error]
The drush command 'features-revert feature_1' could not be executed.                     [error]
Command features-revert needs the following module(s) enabled to run: features.          [error]
The drush command 'features-revert feature_2' could not be executed.                     [error]

If I revert the features individually (instead of with fra) by doing drush cc drush and then drush fr feature_1, the feature is reverted successfully. But I have to run drush cc drush before doing any feature command.

Here's the related issue in the Drush queue: https://github.com/drush-ops/drush/issues/73

fullerja’s picture

I am also seeing this behavior with Drush 6.1. I get it with drush fr, as well as drush fra

BarisW’s picture

Samen here with drush 6.1.0. Also with drush fd.

hefox’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Please see drush issue queue. There may be something with with features drush integration, but not from what I've seen -- the error just doesn't make sense.

My guess it's features intergration commonly seeing it because of when features tends to be run (after updates, etc.).

BarisW’s picture

Here's the issue in the Drush issue queue: https://github.com/drush-ops/drush/issues/79

nategasser’s picture

I see this from time to time and so far I've always been able to clear it up with either a "drush cc all" or a "drush updatedb"

geerlingguy’s picture

Ditto all the above comments; if I run drush cc all when I get this notification, then re-run fra, it works. Annoying, but thought I'd give another +1 here, since this is about the fifth time my googling has brought me here :P

dkinzer’s picture

Update: my issue had nothing to do with this issue.
Not 100% sure this is related, but I ran drush fra and drush fr via a dugger and noticed that `hook_fielb_base_alter` is run after `hook_field_base` when using the single option, but when using `fra` it's the other way around (which of course doesn't make sense).

nicholasruunu’s picture

Yeah, just had the same issue, drush cc all fixes the problem.

kenorb’s picture

The same here.

This may be drush issue: https://github.com/drush-ops/drush/issues/79

rwam’s picture

Version: 7.x-2.0-beta1 » 8.x-3.7
Status: Closed (cannot reproduce) » Active

Puh, we ran into the same problem with Drupal 8.5.4, Features 8.x-3.7 and Drush 8.1.14. Annoying.

Doesn't work:

drush updb -y
drush fim team -y
>> Command fim needs the following extension(s) enabled to run: .    [error]

Work:

drush updb --cache-clear=0 -y
drush cr -y
drush fim team -y
>> Current state already matches active config, aborting.            [ok]
kenorb’s picture

Version: 8.x-3.7 » 7.x-2.0-beta1
Status: Active » Closed (cannot reproduce)

@rwam Your problem is completely different with different major version. I've created an issue here: #2986328: Current state already matches active config, aborting.