Another article in the TYPO3 version 4.5 LTS series and we are not done yet. The workspaces team lead by Sonja Scholz has worked extra-ordinarily coordinated on workspaces for TYPO3 version 4.5 and is still working very dedicated for the coming 4.6 release. Sonja gives an overview of how workspaces for TYPO3 work and gives us insight in some of the history.
Susi is an editor of the website for the worldwide company Investment AG. She was asked by her boss Hans to change a product article on the website. The boss wanted to be sure he and Peter, the company lawyer, reviewed the article before publishing it on the website. Of course the website was made with TYPO3. How would you suggest Susi should accomplish this? The old way would be to create a hidden content element and somehow show Hans and Peter a screenshot of the updated website. This is not a very convention solution and to solve this problem you should instead use Workspaces!
As you might know, Workspaces is a feature Kasper introduced in TYPO3 4.0. Thanks to him for that! As you may also know, a Workspace team was formed at the TYPO3 Developer Days in June 2010 to take over the further development of Workspaces. Through Skype meetings every other week, the Core Sprint Meeting in Stuttgart and the great support of the HCI team, the Workspace team was able to achieve some great results for TYPO3 4.5, even more than was hoped for when the team was formed. Communication within the team is facilitated by having its own Forge project and two mailing lists (One for handling of issues, like the Core list and one for questions). If you are a developer, have bugs to report, or ideas to discuss, do not hesitate to contact the team at Forge or in the workflow mailing list.
In TYPO3 version 4.5, the workflow management, called Workspaces, is simple to set up and easy for users to understand thanks to a brand new user interface. This new module is based on ExtJS to perfectly fit to the TYPO3 backend philosophy and is the first backend module which uses the Extbase/Fluid technology. Additionally, there is a new workspace preview which allows the editor to simply review changes and see the differences between two website versions with an easy to use merge slider. In previous versions of TYPO3, it was only possible to have the following workflow stages: Editing, Review, Ready to publish, and Live. In TYPO3 version 4.5 a new custom stages feature has been added which allows the administrator to set up a completely customized workflow, These steps are fully described later in this article. With this feature complex workflow processes can easily be built up. Although documentation existed for workspaces and versioning in TYPO3, it was still difficult for administrators and editors to get started with this enterprise feature. To address this problem, there is a new documentation  about Workspaces, making it easy for administrators to set up a custom workspace. In addition to these changes, there have also been many bugfixes and cleanups.
With that overview out of the way, we can get back to Susi's situation and show how easy it is to solve using Workspaces. We are now the administrator who will set up a new custom workspace. Before we begin, we have to think about our workflow and which stages we have. First, there is always the “Editing“ stage when Susi changes something on the website. After that, we have the “Review” stage, where her boss Hans checks her changes. Next we have the “Check by law” stage, where Peter checks for any legal issues. Finally, you always have the “Ready to publish” and “Publish to live” stages.
Now that the workflow is clear, you have to check if TYPO3 version 4.5 is used for the website. If not, the administrator should perform an update first.
Once TYPO3 version 4.5 is installed, you should make sure the two extensions “workspaces” and “version” are installed and loaded in the Extension Manager.
Go to the root page (id=0) and create a new workspace record, providing a title and description.
In the “Users” tab, select the backend users who are using this workspace as members. In our example you would select Susi, Hans and Peter. Susi is also set as the owner since she is allowed to publish the changes to the live version of the website as well. Select “Notify users on next stage only” so Hans and Peter receive a notification mail as soon as they should review something. We assume that Susi, Hans and Peter already have backend user accounts with proper permissions for the website. Because of that, you do not have to select anything in the tab “Mountpoints.” Instead, the user permissions from the backend user accounts will be reused in the workspace.
You can now go to the “Staging” tab and set up the workflow process that we defined earlier. Since “Editing”, “Ready to publish” and “Publish” are default stages, you do not need to define them but you do need to create the custom stages for “Review” and “Check by law”. A title is required for every stage. You also define the people that are responsible reviewing and editing at this stage. In our example Hans is responsible for the “Review” stage and Peter is responsible for the “Check by law” stage. Finally, it is not required but you can add a default comment for the notification emails.For example, “Please also check the American law.” You can save the workspace record now.
The backend user group has to be changed now, to allow the editors Susi, Hans and Peter to see the Workspaces backend module. After this, you are finished and can use the custom workspace. Of course, more complex situations will require additional settings that are described in the documentation.
Now that the initial setup is complete, let's pretend you're a normal editor like Susi, Hans or Peter and want to use the custom workspace that has been set up for you. First, log in into the backend as Susi.
Change your workspace from LIVE to the custom workspace using the workspace selector in the top right corner.
Go to the page module and change a content element. This change won't be live directly, as you are in a workspace now.
Go to the workspace module and review your changes then send the changes to the next stage “Review”.
With this stage change, Hans will receive a notification mail which asks him to check the content element change. Susi is done now.
Hans reads his email notification and then logs in to TYPO3. He goes to the workspace module and sees the changes Susi has done.
He checks the changes by looking at the difference detail view or by clicking at the preview icon which opens the new workspace preview. If everything is ok, he sends it on to the next stage “Check by lawyer” where Peter is responsible. If something needs to be changed, of course Hans can send it back to the previous “Editing”. In this case, Susi would get an email with comments from Hans. Alternatively, Hans could correct the mistake himself.
After Peter reviewed the changes, the content element change will be in the stage “Ready to publish” where Susi will get a notification mail because she is the workspace owner and the only one allowed to publish change. Susi will send the change to “Publish” which means it is LIVE and published on the website.
As you can see, many improvements have come to workspaces but we are not finished yet. We already have goals for TYPO3 version 4.6, such as improving the history management in Workspace mode, creating todo's and tasks for the editor in the taskcenter module, extending configuration possibilities for db mounts and many smaller issues. Do you also have ideas of what should be improved in versioning and workspaces? Do not hesitate to contact us. We are looking forward to helping hands and maybe new team members. Last but not least, I want to say a big thank you to the Workspaces team for their excellent, continuous work, to the HCI team for the great new design, to the skin team for implementing it, and to Ernesto Baschny and Steffen Kamper for their answers to many questions. Personally I want to say thank you to cab services ag for giving me the time to go to the sprint meetings and of course my fiancé Jörg for his understanding and support when I was spending hours in front of my notebook.
Project Leader Workspace Team
Special thanks go out to Jeff Segars for proof reading the article.