Our Blog

20.12.11 @ 17:42

Presenting Ftools: Un-Link Features Elements safely

SUBMITTED BY Yuval Perelman

While Features module is one of the main building stone of any Drupal website today, it has some aspects which can drive you (and/or your client) mad.
One of it's bigest problems is that it creates a very strong link between the feature and the configuration of the website. You may say:

"Hey! that's the whole idea of Features!"

Yes, that's right, but only as far as transferring configuration between different environments of the website (the famous Dev > Staging > Production path). Once a feature is installed on a production server, and the website operates as advertised, the client may want to start modifying it. The most evident example is adding menu items and changing labels in views. The client just got a super duper CMS and they certainly have the right and ability to modify such elements on their website. However, once they touch anything which resides in a feature, they break the holy path described above.

If the development of the website is done and over, nothing bad happens. However, if the development continues, the developers will find themselves rather limited, as they will have to download an updated feature each time before they touch the code. This can be a tedious task if the websites undergoes continuous development, and the client is constantly modifying and adjusting their website (this is also true for the last phase of the development, even before going live).

The intuitive solution for the unexperienced developer, would be to simple remove the relevant components from the feature. Ha ha! When you remove an element from a feature, this element is removed from the site completely, and is not getting pushed back to the DB. There go lots of efforts done by the furious client, and the frustrated dev now needs to dig in backups and code to understand what went wrong...

"Hey! that's the whole idea of FTools!"

Yep! Our new Features Tools (FTools) adds a "Safe Un-Link Feature Element" functionality to the recreate feature form. By doing so, a copy of the detached element is kept as a file, just like feature saves configuration in files, and the modified configuration does not gets lost. The following video will teach you how to use the FTools to auto create a feature, and to safely unlink elements from a feature without loosing any data.

0 Comments so far

Post a Comment

The content of this field is kept private and will not be shown publicly.
  • Use one of the forms name.module, name.theme, name.translation, name.installprofile or name.project, in order to link to http://drupal.org/project/name. Note that a link will be generated even if a project does not exist.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <b> <a> <p> <br> <em> <strong> <cite> <blockquote> <table> <tr> <td> <th> <tbody> <ul> <ol> <li> <dl> <dt> <dd><img> <div> <h2> <h3> <h4> <code>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.

More information about formatting options


Or