In the past I’ve detailed about ways to export your site configuration to code using Drupal. This is important so you can manage moving your website from 1 server to another, like a Development server to a Production server (changes). Possible tools I’ve described in the past to move configuration around within Drupal are Features and the Configuration module. When using Features — features takes ownership (or tries really hard to own your configuration) of your exported Content Types in Drupal. In Drupal buzzwords we say Features locks the content type from future changes. Sometimes it’s nice to undo the death grip Features has on your content type.
Example of a Feature
If we create a simple content type, called MyCustomType, with a few basic fields in Drupal it appears as follows:
Having created our content type we can use the Features module to create a Feature for use on our website. We simply select the content type and it’s fiels are auto selected by Features for inclusion in the feature.
We then export the feature to a .tar.gz file and then extract the folder to our /sites/all/modules folder and use Drush or the Module listing page to activate the new Feature. We can then see the Feature is installed:
So now our Feature is installed on the website. But, what did I mean when I said Features locks the content type? Well, we cannot edit the machine_name of the Feature for example on the Content Type admin pages. Let’s take a look at the database settings of the Content Type (here I use PHPMyAdmin, use the tool you like most):
Unfeaturizing this Feature
How can remove this locking? Essentially we modify this locked boolean field of the content type. Recently, a small module was created to help with this task called the Unfeaturize module.
The directions by the project creator of this module are provided on the project page, they are:
- Disable the feature (module) that owns your content type
- Enable this module (make sure you have permission to administer content types)
- Visit admin/config/development/unfeaturize
- check the boxes for the content types you’d like back
- click the “Unfeaturize” button.
- Profit.
Note: don’t Uninstall the Feature owning your content type — That would be Bad.
So if we work through these steps, at step (3) we are given choices on content types to unfeaturize:
We can then see after unfeaturizing our content type that we may now edit the machine name of the content type, horray!
If you end up using Features I hope you find this small tutorial helpful!
Looking for quality web hosting? Look no further than Arvixe Web Hosting!