9

I created a feature module in site-1.

Then I instaled the feature module in site-2. This features creates a new content type and enable a module. Then I got the new content type and the module enabled.

So far so good.

Now I disabled and uninstall de feature module(drush). I expected the content type to be deleted and the module to be disabled, I mean the content type and the module that the feature created.

But they are still there...

How do I disable a feature and remove all the things that the feature created?

UPDATE: Steps I did to disable the feature:

1) drush dis myFeatureModule

2) drush pm-uninstall myFeatureModule

3) in admin/structure/features the feature myFeatureModuleis disabled

4) The delete button for the content type (created by this feature) in admin/structure/types is missing...

2

The first thing you will want to do is disable (and uninstall) the feature module. That doesn't always remove everything the module initially created. Once that feature module is uninstalled however you can go in and manually delete the content type and anything else that was left on the site.

Some additional detail can be found at this other question. It provides an example of how the feature module can add an uninstall hook to unlock the content type. Looking at the query used in that example you should be able to run the query manually and unlock the offending content type.

  • 1
    I already did that, but the "Delete" button for the Content type at admin/structure/types is missing. Then can not delete it. Please take a look to my UPDATE – chefnelone Jan 30 '14 at 9:03
  • Drupal doesn't display the delete button because it thinks the content type is owned by a module... but you can still delete it by typing in the proper URL. admin/structure/types/manage/[content_type]/delete <-- URL pattern. Just change [content_type] to the content type you want to delete. – Craig Jan 30 '14 at 15:40
  • Is there a way to make the delete button reappear again? – Bart Jan 31 '14 at 9:05
  • I updated my answer with a link to a similar question that has a query you can use to unlock the content type. – Craig Jan 31 '14 at 13:12
-3

After you disable your feature, you should be able to go to:

sites > all > modules > custom > features

Find your module in there and just delete the files.

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.