Resolving Conflicts
During the publishing process, Liferay checks for conflicts between your publication and the production environment. Resolving all conflicts is necessary to complete publishing. Some conflicts are resolved automatically, while others need manual intervention.
Conflicts occur only when production changes are made after changes have already been made in a publication. Publications are updated automatically with non-conflicting production changes.
Automatically Resolving Conflicts
Liferay automatically resolves some conflicts using predefined solutions, such as:
- Adding, modifying, or removing content from the publication.
- Replacing the production version with the publication version.
If an automatic solution is available, a notification appears during publishing. Review the details by clicking View, then Publish to implement the solution.
Manually Resolving Conflicts
Manual resolution is required when Liferay cannot resolve a conflict automatically. Publications identifies the conflict type and provides two options:
- Edit: Navigate to the conflict source within the publication and make necessary changes.
- Discard: Preview and permanently remove the conflicting changes from the publication.
Discarding changes is permanent and cannot be reversed. Save the content you want to keep before discarding it from your publication.
Conflicts on Scheduled Publications
Liferay DXP 2024.Q2+/Portal 7.4 GA120+
Scheduled publications are more susceptible to conflicts due to potential changes in production during the scheduling period. When that happens, Liferay tries to handle some conflicts automatically, but sometimes you must intervene manually.
Either way, notifications are sent to involved users (i.e., publishers, editors, administrators, and owners), with conflict details and resolution steps.
To view notifications, open the User Administration Menu and click Notifications.
When the scheduled-publications-conflict-checks
is set at the Job Scheduler, periodic checks identify potential conflicts for scheduled publications. By default, the cron expression is set to midnight UTC.
If scheduled publications run into conflicts or errors, users are notified when the conflict check runs.
Users can access a list of conflicts through the notification, which shows conflicts resolved automatically and those requiring manual resolution.
If Java errors unrelated to conflicts occur, the notification contains a link to stack traces for further investigation.
Understanding Conflict Types
Users can encounter six general types of conflicts: Duplication, Modification, Deletion Modification, Modification Deletion, Missing Requirement, and Addition.
Duplication Conflicts
These conflicts occur when something in production uses the same unique value of a change made in the publication. This can be caused by any type of component that requires a unique value (e.g., a folder, url, role name).
Consider the following example. Suppose you’ve added a new folder named “Marketing” to a publication, while a user in production creates a folder using the same name. Since folders in the same repo must have a unique name, attempting to publish your change results in a duplication conflict.
To resolve duplication conflicts, users can either edit the value in their publication, or discard their change.
Modification Conflicts
These conflicts occur when an entity you’ve modified in a publication is then modified in production (e.g., when an edited Web Content article is moved). While some modification conflicts can be automatically resolved, others require manual resolution.
To resolve modification conflicts, you can edit the conflicting material, discard the conflicting changes in your publication, or replace the version in production.
Starting with Liferay DXP 2025.Q1+, certain conflicts are resolved automatically without manual intervention. This includes fields that are typically immutable, such as
statusand
lastPublishDate.
Note that audit fields (e.g., createDate
, modifiedDate
), primary keys, and group identifiers are excluded from automatic resolution to preserve data integrity.
Conflicts involving non-editable fields like color
, title
, and description
, are resolved automatically during publication. For example, if a web content’s fields are updated in both a publication and production, the publication’s updates overwrite the ones in production without manual intervention.
Deletion Modification and Modification Deletion Conflicts
These conflicts occur when an entity is modified or deleted in different environments. There are two types of conflicts:
-
Deletion Modification: This conflict happens when an entity is deleted in production but is modified in a publication. For example, if a document is deleted in the production environment while being edited in a publication, a conflict arises because the system can’t apply the modifications to an entity that no longer exists in production.
-
Modification Deletion: This conflict happens when an entity is modified in production but deleted in a publication. For example, if a document’s metadata is updated in the production environment, but the same document is deleted in a publication, the system flags a conflict as it cannot apply modifications to an item marked for deletion.
Starting in Liferay DXP 2025.Q1
, Modification Deletion conflicts are resolved automatically by default. If an entity is edited in a publication and then deleted within the same publication, it is also deleted in production when the publication is published.
To review deletion conflicts during publication, go to the Global Menu () → Instance Settings under the Control Panel tab → Publications → enable the Modification Deletion Conflict Check setting under Publications Conflict.
The only provided resolution for both types of conflict is to discard the publication’s conflicting change.
Starting Liferay DXP 2024.Q2+/Portal 7.4 GA120+, you can prevent conflicts and avoid deleting items modified in a publication by adding the change.tracking.deletion.protection.enabled=true
property to your portal-ext.properties
.
This property blocks the deletion of the item if it’s being modified in a publication, whether the deletion happens in production or in another publication.
When attempting to delete an item, an error message appears, preventing deletion.
If you delete an item immediately rather than moving it to the recycle bin, the deletion is blocked and an error message appears.
However, if you delete an item that is moved to the recycle bin first (e.g., web content articles, blog posts, and documents), the item is moved to the recycle bin, and the message only appears once you try to delete it from the recycle bin.
This means those items can still generate deletion conflicts even with the protection property in place.
Liferay DXP 2025.Q1+
When a modification occurs in a publication and the target element is moved to the recycle bin in production, publication administrators can click Restore in Production to restore the asset and resolve the conflict.
Supported assets include folders, web content, blogs, bookmarks, documents and media, message boards, and wiki.
This feature requires the recycle bin to be enabled.
Missing Requirement Conflicts
These conflicts occur when a child entity is created or edited in your publication, while its parent has been removed from production. Examples include deleting a folder from production when your publication adds or modifies a sub-folder.
To resolve Missing Requirement conflicts, you can discard the conflicting changes from your publication or revert the deletion in production. See Reverting Changes for how to revert changes published to production.
Addition Conflict
These conflicts only occur when users attempt to revert a publication including a deletion that has already been reverted. Users cannot revert the same publication twice if it included a deletion, since the system cannot add back what has already been added back.