The module handles publishing of content from an author instance to a public instance. In DX Core, the functionality of this module is extended by the Publishing Transactional module, which ensures synchronization of content between multiple public instances.
Content publishing and content synchronization
Always wait with content publishing actions until all content synchronization tasks have been finished.
If you attempt to publish a page while the Synchronization module is mid-sync and has not yet synchronized the page’s parent, the publishing process will fail.
The module (parent) consists of four submodules. All of the submodules are required for the correct functioning of the publishing feature.
Provides the main functionality.
Handles send operations to the public instance.
Handles receive requests on the public instance.
Generates new publishing keys and provides a publishing monitor.
Installing with Maven
Maven is the easiest way to install the module. Add the following to your bundle:
<dependency> <groupId>info.magnolia.publishing</groupId> <artifactId>magnolia-publishing-core</artifactId> <version>1.3.7</version> </dependency>
<dependency> <groupId>info.magnolia.publishing</groupId> <artifactId>magnolia-publishing-sender</artifactId> <version>1.3.7</version> </dependency>
<dependency> <groupId>info.magnolia.publishing</groupId> <artifactId>magnolia-publishing-receiver</artifactId> <version>1.3.7</version> </dependency>
<dependency> <groupId>info.magnolia.publishing</groupId> <artifactId>magnolia-publishing-app</artifactId> <version>1.3.7</version> </dependency>
Publishing is configured in Configuration >
Please be very careful when modifying the configuration of publishing and always test the changes thoroughly before applying them to a live environment. Sometimes there may exist a better way of solving a publishing-related problem than by tweaking a publishing configuration.
The main part of the configuration is under
Defines where the information about publishing is logged. The default implementation (MemoryPublishingStorage) keeps the information in memory.
Contains the list of receivers where content will be published.
Contains the list of operations provided by Magnolia and the respective operation classes:
commit(DX Core only)
rollback(DX Core only)
You can define your own operations and add them to the list, but in this case, you will also have to implement your own send and receive operations. SendOperation is a base interface that all send operations must implement.
With a custom-defined operation, you can publish content to something that is not a Magnolia public instance, for example to a custom API or a Content Delivery Network.
The property has been introduced with module version 1.2.6. By default, path-based locking is configured using
lockManagerMode=path. Node-based locking can be set with
|The setting is applicable only on public instances. Changing the property on the author instance has no effect.|
Publish and unpublish commands
Users typically publish content by clicking Publish in the Action
bar. The click executes a
publish command which pushes the content
from the author instance to the public instance(s). Conversely, when
users click Unpublish the system executes an
unpublish command which
deletes the content from the public instance(s).
unpublish commands are configured in
default catalog contains the
commands which just publish the content without versioning. Magnolia
also provides a
versioned command catalog. It contains identically
unpublish commands which first version the content
and then delegate to the default commands.
Both in the
default catalog and in the
versioned catalog, the command tree contains also the
deactivate commands (not shown below), which extend the
unpublish commands, respectively. The two commands are included in the configuration for compatibility reasons.
To use one of these commands, define the catalog and the command name in the action definition. See an example in Executing commands with actions.
If necessary, you can disable publishing on the public instance(s) by
enabled node in Configuration >
/server/filters/publishing and set its value to
How publishing works
For an overview of how publishing works see the Publishing overview page.