Devtools synchronization details

This guide explains how objects are synchronized between the CMS and the filesystem with the help of the Devtools feature.

1 Adding objects to packages

Objects, that are added to a package will immediately be written to the filesystem (regardless of whether automatic synchronization is enabled or not).

2 Automatic synchronization

Initially, after the CMS Tomcat is started, the automatic synchronization is disabled. This means that changes of objects in the CMS will not be reflected in the filesystem and changes in the filesystem will not be reflected in the CMS.

The automatic synchonization can be enabled in the UI by checking the checkbox Automatic synchronization in the packages list.

Automatic synchronization is enabled for the current user, which means that when the automatic synchronization mechanism changes objects in the CMS, this will be done on behalf that user (regarding edit locks, permissions and log entries). Automatic synchronization is always enabled/disabled for all packages.

The following table shows the relationship between initiating actions, triggered actions and automatic synchronization:

Initiating action Triggered action Depends on autosync
Create package in CMS Create package directory in fs No
Delete package in CMS Delete package directory structure in fs No
Add object to package Write object to fs No
Remove object from package Delete object directory in fs No
Change object¹ in CMS Write object to fs Yes
Delete object¹ in CMS Delete object directory in fs Yes
Update file in fs Modify object in the CMS Yes
Create (consistent) file structure for object Modify/create object in the CMS Yes
Remove object files/directory in fs No triggered action No
Remove package directory structure in fs No triggered action No

Initiating actions marked with ¹ only trigger actions, if the object acted upon is already part of a main package (but not, if the object is only part of a sub package).

3 Objects in multiple packages

It is possible to add the same object to multiple packages. When automatic synchronization is enabled and the object is changed in the CMS, the object will be synchronized with all packages it is part of.

4 Trigger chain reactions

With the automatic synchronization enabled, some actions might trigger other actions which then become the “initiating” actions and trigger other actions themselves.

Examples:

  • An object is changed in one package, automatically synchronized into the CMS and then automatically synchronized to other packages.
  • The gentics_structure.json file of a datasource is changed to contain a new entry (without specification of a global ID). The datasource is automatically synchronized into the CMS, which will create a global ID for the new entry. Then the datasource is automatically synchronized back into the filesystem, which will change the gentics_structure.json file to contain the global ID.

5 Manual synchronization

Besides the automatic synchronization it is also possible to synchronize a single package manually either from the filesystem into the CMS or the other direction.