8

Is it possible to keep the data created by a feature after deleting feature itself?
I created a migration feature that is really just a one off; I would want to delete it without losing the nodes created from it.

6

Features module is a way to export most of the settings normally stored in the database into code. If you delete the feature, you delete the code which deletes everything.

The cool thing about features is you can change the settings for things (views, panels, etc) at any time and those changes get stored in the database. Once they're stored in the database it should be OK to delete the feature (though I haven't tried this myself).

The easiest way to do this would be to go into each item that your feature has and re-save it. For example, if your feature had a view called "News" you can go to Structure > Views > News > Edit. Then click save on that view. If you look at your feature, it should now say "Overridden."

enter image description here

Once everything is overridden, it should be OK to delete the feature. Make sure you do a backup of everything and try disabling the feature first to make sure everything you need doesn't disappear.

4

You can use the Features Tools module. The main goal of the module is to give the ability to remove elements from a feature and put them back to the DB.

  • 1
    I am having a hard time figuring out how to use this. How can I simply unlink the whole feature into the database? I then want to remove all traces of the features module and features tools. – Chris Muench Dec 2 '11 at 19:46
  • In order to save the elements to the DB you need to go to the admin/build/features/unlink page, check the element you need to import and submit. – user842 Dec 2 '11 at 20:04
  • That page does not exists, it just gives me a default page. I am using Drupal 7. – Chris Muench Dec 2 '11 at 20:07
  • Sorry, that's the D6 path. Try admin/structure/features/unlink (Make sure you tag your question with a Drupal version number.). – user842 Dec 2 '11 at 20:13
  • 1
    See linnovate.net/blog/ftools-unlink-feature-element-functionality for a tutorial. – user842 Dec 20 '11 at 16:56
1

I found an easy way to do this is just comment out all dependencies from your .info file and then safe recreate, disable/ uninstall.

  • @rob-steinhilber: so all you do is "comment out all dependencies from your .info file for the feature and then save the file then recreate the feature, then disable/ uninstall feature." and the data is kept that was created by a feature after deleting feature itself? – John Mitchell Jan 8 '16 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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