.Blog

Drupal Weekly Module Review - #2 Configuration Management, an alternative to Features.

Drupal Weekly Module Review - #2 Configuration Management, an alternative to Features.

This week we will talk about Configuration Management, an alternative to Features, more user friendly, but definitely still much unripe.

Configuration Management is a contrib. module of Drupal, so to download it is enough to go to the download page of Drupal modules and search Configuration Management (link https://www.drupal.org/project/configuration).

The installation of the module is traditional, so I do not stop too much.

Once downloaded the module from the link gave above, put it on the sites/all/modules/contrib folder and enable it on the modules page, that you can find on the following link: yourwebsite.it/admin/modules.

Once activated, you will find a new Configuration Management menu item on the Configuration section.

For an easier understanding, in this guidebook, I will refer and compare this module with Features.

Get into the module interface it will appear a simple one with different options, divided by tabs.

TRACKING

On the Tracking tab is possible to show everything you want to take “under control”.

To “take under control” I mean that, thanks to this module, it is possible to have predefined settings packets (content type settings, determined fields settings), to import or export when you need it most. For example, on the Features, modules, this page is very similar to the features list, but view in a different way. Indeed this tab thinks by Under tab, as the following image:

 

So, unlike Features, the settings to “control” are divided by content types, fields, variables and permissions (and other tabs that we can enable on the Not Tracking). Unfortunately it is not possible to export any other configurations outside those visible in Not Tracking.

NOT TRACKING

In this tab it is possible to display all that it is not exportable yet.

 

This section is easy to understand, indeed to insert new configurations and settings to take “under control” is necessary to select the configuration desired and click on Start tracking, so to show them on Tracking tab seen in advance.

SYNCHRONIZE

In this section is possible do a very important action but also dangerous.

I try to explain me better, in this section is possible do a sync from imported files to the configurations available on the database.

Indeed the power of this module (available also in Features) is the possibility to insert, modify the configurations en masse, without insert all of them perforce manually.

And here that it can be dangerous, indeed you need to to export before all the modifications that we have done, then click on Synchronize configurations, penalty the complete delete of all the settings and configurations not exported.

To make a comparison with Features, this section allows to do a complete Revert of all the settings available on the Tracking tab.

MIGRATE

 

Simply, in this section it is possible to do the import and export of the configurations desired.

ATTENTION:

It is MANDATORY to do this procedure from Drupal, because does not exist the split in folders available in Features and all the configurations files are on the root (default/files/configuration) all together with the other configurations.

SETTINGS

In Settings, clearly, it can select all the available options for this module, as the destination folder of the files or which configurations to keep out from this module.

In-depth examination

If you have installed this module in local or on your online website you should definitely noticed these three buttons at the end of the Tracking page. What are they used for?

  • Write Activestore to Datastore: allows to copy imported files from database files (clearly losing the data not saved).
  • Stop Tracking: allows to remove the configurations desired from the Tracking page selecting them and later clicking on Stop Tracking.
  • Import Datastore to Activestore: allows to copy from database to files the available configurations on the Tracking page.

For who uses Features these three buttons are nothing new, indeed the module works with its same logic, that is:

  • “features” from code (i.e. files) are named Activestore,
  • “features” from database are named Datastore.

In other words, the Write Activestore to Datastore button simply does the Revert of the “feature”, and the  Import Datastore to Activestore one does the Recreate.

 

And for this article it is all!

Do you use Features? What do you think about this module? If you do not use it, will you try it?

For any question, do not hesitate to leave a comment!