Being one of the best CMS on the market, Drupal always ensures that their modules are top-notch, especially those that are implemented into Drupal core. One of these modules is Workspace and this is why our developers explored it a bit more.
The Drupal 8 Workspace module has been implemented into Drupal core since version 8.6.0. Whilst it has still not quite surpassed the experimental stage, improvements, new functionalities and smoother service when working with other complementary modules can be expected in the near future.
In order to find out more about the Workspace module, we asked one of our great Drupal developers Slobodan Prodanovic to share his tips on how to make the most out of this module.
What makes Workspace a valuable ally?
The main functionality that Workspace brings it’s that it creates multiple environments which can be used for a preview of bulk changes before deploying them to the live site. It can be used for testing single changes, but it shines when it comes to multiple changes.
When you enable it, it comes with two workspaces enabled: Live and Stage. Live is the current version of the site. Stage represents a snapshot of the current live version of the site, and by switching to it we are able to test all of our changes before deploying them to live.
In stage mode, we can only create/edit entities that can be reversioned. For example, if you want to, let’s say, enable some additional contrib module in the staging environment, that is not possible, at least not at the current time.
Ease of use
Workspace is very intuitive to use. In the top right corner you can see which environment is currently enabled, links are set in a way that you can easily get on the page that you need, or to perform a task that you have in mind.
Here’s one simple case of use:
Let’s imagine that we have a live site of the company on which its current organisational structure is displayed. The company has a CEO, under whom are CTO and CFO.
The CEO manages the company together with the Managing Board.
The company is in the process of restructuring and the role of CFO is now obsolete, whilst a new role of Vice President will be created. We need to implement changes to nodes on our company site according to it.
By clicking on the Workspace menu, we can switch to the stage environment. Here we can perform changes to nodes in a regular way, that we have done on any Drupal site.
In the screenshots below, you can see that changes have been made on the staging environment, but for anonymous users it’s still displayed on the old version, the version that is still current on the live environment.
In this staging environment, we can see how changes will look and test them before deploying them to live. The downside is that if someone tries to edit a live node that has been edited on staging environment and not deployed to live, they will get a message that the node is locked and that it is not possible to do something like that.
After all the changes are all tested, and we have approval to deploy them to live, deploying them to live is very easy. It is just two clicks away:
To sum up
Workspace module is built on a great idea, to create an unlimited number of containers that provide options that we can test changes before we decide if they are going to be implemented or abandoned. If implemented correctly, it may save time and resources.
But it’s still in the experimental phase for a reason.
Sure, it provides core functionality, it still can give you a headache when trying to get it to work with some other modules (like deploy for example). There are a lot of improvements and functionalities that can be added to it to make it more useful for users, but it still can take some time before it gets into full operational mode.
Looking for a Drupal development company? Make sure to get in touch with us today! And if you are looking for more articles about Drupal such as how our team uses Docksal, make sure to follow our blog.