1

I have recently started to using Features, it was due time.

Once thing I started to wonder, is, once you created your feature locally, what's the best way to work with it. I first thought that creating the feature was enough and once it was there you could use it as such, but disabling the newly created feature doesn't remove everything the features exports, so it doesn't behave the same way as if you installed the same feature on a plain site.

Is that on purpose? If so why? What are the details I should consider for working with Features on the initial site.

1 Answer 1

0

How features store settings

Features that are created locally have all there setting and content in the database as they where there before you export them to the feature, as an example if you created a view it will reside in the database even if you exported it to a feature.

as for features enabled on another site it will store every thing in the database when enabled except for ctools exports, which in this case even if you disable or uninstalled the feature those sittings will persist in the new site database, an example a strongarm (variable) will still be set even after you uninstall the feature.

as for settings using ctools exports they will not be added to the database unless you have override them, as an example if you had a view exported through features it will disappear if you have disabled the feature since it only exist in code.

Conclusion

Features do not delete any thing in your database if uninstalled, except for true exportables that can only reside in code without the need to be in the daatabse to work.

Suggested features workflow

When creating a feature on you local development machine it is a good thing to enable it to see if the settings in your database and the settings in the feature does match and be aware if they do change.

As for removing things added by the feature you can add a hook_uninstall manually to your feature .install file and remove or delete what ever you like just like a proper module will do when uninstalled.

More info about this issue:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.