User login


Deleting Drupal Fields Programmatically (So As to Change Field Type with Features)

In brief: The code at the bottom of this post deletes the named fields. If you are changing the field type for one or more fields, put it in an update hook for a feature module and run update.php before running features revert, your feature will happily rebuild the fields with their new settings. This destroys data.

FieldException: Cannot change an existing field's type. in field_update_field() (line 230 of /home/ben/code/sdl/web/modules/field/

How to create a Feature without the initial download through the UI

If you hate downloading and unzipping the initial feature you create as much as i do, because you haven't bothered with that foolishness since Drush, this post is for you.

This is the minimal information needed (from my experimentation) for Features to recognize your module as a Features module. Then you can add variables and other features through the UI (or Drush), and drush fu feature_example to update your module code (where feature_example is the name of your feature) and fu stands for features-update.


Features cannot update the names of roles

Features stores Drupal roles as their string name, not their ID. This is so that they are in theory exportable (like Views, variables, and - when enhanced by features_extra - blocks and vocabularies). Naming something by a machine name rather than an autoincremented numeric database ID allows

However, the only information carried with a role is its name! Therefore, trying to take a role name change from one site to another results in the following:

Strongarm usage notes

Strongarm does not have its own administration page (that does anything). Add variables to your export by going to the Features administration page.


Overview of Development to Live Deployment Strategies


Plain Everything-in-code

Features module notes

  • Features Extra block (fe_block) does not export block cache settings (from the contrib module).
  • Views export is either broken or, more likely, it knows when they are already defined by a module.
Syndicate content