I'd like to be able to have two features modules, a "dev" module with variable components set to values suitable for local development (css, js compression off, email sending disabled, etc.) and a "prod" module with the variables set to their appropriate production values. Right now I have the "prod" module created and I found that I cannot create the dev module with the prod module present, but disabled - the command gives an error like:

» drush fe mysite_dev_variables  variable:antispam_connection_enabled variable:hubspot_log_code variable:jquery_update_compression_type variable:preprocess_css variable:preprocess_js variable:cache variable:block_cache
No unexported variable components match "hubspot_log_code"                                                                                                                [error]
No components to add. 

There is a patch at http://drupal.org/node/1331278#comment-5563416 that includes an "--allow-conflicts" option which I think would work, but in #35 of that issue the "--allow-conflicts" is said to belong in a new issue - I didn't see one already created so I'm creating it now.

Comments

mpotter’s picture

This actually sounds more like a bug. If the current module is disabled, then Features should allow you to export the component to another feature. Are you sure the prod module was disabled? Did you clear cache?

pcavanaugh’s picture

Yes, it happens even if i clear the cache first.

With drush version 5.7:

» drush cc all
'all' cache was cleared in /Users/pcavanaugh/Sites/mysite#default                                                   [success]
 » drush fc variable:preprocess_css  
 Available sources                                                   
 variable:preprocess_css  Provided by: mysite_dev_variables 

 » drush pm-list | grep mysite_dev_variables
 Features            MySite Development Variables (mysite_dev_variables)        Module  Disabled                             
 » drush fe test_feature_module variable:preprocess_css
No unexported variable components match "preprocess_css"                                                                [error]
No components to add.
mpotter’s picture

Are you able to add the preprocess_css component to a new feature via the Features UI? Or is it just a problem with "drush de" ?