The drush fc command sometimes doesn't list components that the Features UI does.

This is because it's using features_get_feature_components(), whereas the UI uses features_get_components().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

joachim’s picture

Status: Active » Needs review
FileSize
567 bytes
mpotter’s picture

Can you give some examples? The features_get_feature_components() is specifically filtering the list to remove those with "features_source" . The comment says: "Returns components that are offered as an option on feature creation." So it seems like this might be done on purpose.

joachim’s picture

Without the patch, I am missing:

- commerce_customer
- field
- variable_realm

I agree that the first two look like they don't belong in the list.

variable_realm however is definitely something you'd want to export -- it was its absence that prompted me to investigate this.

Is variable_realm perhaps declared incorrectly? It's implementing hook_features_export_options() but not hook_features_api().

mpotter’s picture

Priority: Major » Normal
Status: Needs review » Needs work

Yes, it should implement hook_features_api(), even if it just needs to return an empty array. Otherwise it's not detected as a valid feature source.