You are here

Journal Module as a Basic Configuration Tracker for Drupal

Submitted by devblog on Sun, 15/02/2015 - 00:32

Keeping a log of changes made to a Drupal site is a challenging affair and I have been looking for something to help. I checked out Configuration Management module but found it too complicated for my basic needs. I had also noticed Journal but it seemed to basic for my needs, and I created a content type keep track of stock of configuration assets, like settings for CSS Injector, Display Suite, Context, which endeavours to maintain links to the configuration pages of the actual settings etc.
Journal Entries Report

The content type is not suited to minor adhoc configuration changes, and using it involves taking the time to create a node, hunting down the changes and noting them down. Something to log minor changes such as configuring blocks, enabling or disabling modules etc. is also needed, preferably it on the same page where the configuraton changes are made, and this is where reconsidered Journal. It is a simple module that places a text box below each configuration page for the admin to leave a note of the changes made. It provides a report that lists the notes of the change mades, who made it and when, and a link to the form in which the change was made.
It also provides a block which shows the history made on a particular page when on that page.

One of its downsides is that rather than having a list of sensible defaults and allowing the admin to add additional pages, it works on almost virtually every page there is and you have to set which pages to exclude by setting a variable keyed on the form's id in a $conf array used in Drupal's variables, 0 to disable, 1 to enable.

$conf['journal_form_ids'] = array(
   'ctools_export_ui_list_form' => 0,
   'masquerade_block_1' => 0,
   'switchtheme_switch_form' => 0,
   'backup_migrate_ui_manual_backup_load_profile_form' => 0,
   'backup_migrate_ui_manual_backup_form' => 0,

This requires knowlege of the form id it is where a nifty module, Get Form Id module comes in (developer's blog entry).

It adds a contextual link that displays the form id, and clicking it brings up a dialog from which you can copy the form id, for pasting into the script that creaes the variable array. As you can see Journal's ubiquitous nature on its appearance in said dialog..

Get Form Id Dialog

After posting this article it looks like Blame is another module which offers something similar and looks more developed. I will make some time to check it out later.

It is quite suprising how little it is used, and how very few Drupals site builders use such tools. According to the usage statistics Journal has 235 installs out of 9045 downloads. Blame is only 26 out of 1142. Configuration is 1126 out of 62,120 and must be popular, but I wonder how many sites use it anger. Perhaps being related to Drupal 8's configuration management system helps.

//form_id : setting : menu: page title: comment

$x = array_fill_keys(array_keys($x), 0);

foreach($x as $key => $value){
  $z[trim($key)] = 0;
variable_set('journal_form_ids', $z);
$y = variable_get('journal_form_ids');

Vertical Tabs

Add new comment