Issue
- When changes are done to a page in a site template, the changes are not applied to the derived pages on the actual sites, instead, an exception is thrown:
ERROR [liferay/background_task-8][JDBCExceptionReporter:234] Duplicate entry '36912-36232-/test-1-0' for key 'IX_C753170C'
ERROR [liferay/background_task-8][LayoutSetPrototypeImportBackgroundTaskExcecutor:132] Merge fail count increased to 1 for layout set prototype 36865
com.liferay.exportimport.kernel.lar.PortletDataException: Could not execute JDBC batch update
...
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update - This only happens when the friendly URL's translation is the same as the default translation and it is typed into the field again.
Environment
- DXP 7.3
Resolution
This is a current limitation of Liferay due to the following technical circumstances:
Technical Details
The index IX_C753170C belongs to the table FriendlyURLEntryLocalization. In 7.3, the Friendly URL history for Pages was introduced, this new feature is interfering with this traditional behavior since the history of used Friendly URLs is saved in the tables FriendlyURLEntry and FriendlyURLEntryLocalization, which impose more severe restrictions on duplicate Friendly URLs in page translations.
While the behavior defined in LPS-35221 should be preserved as much as possible by creating an upgrade step to at least deduplicate those translated friendly URLs that are the same as the default language. However, a full solution means redesigning the DB schema, which can only be backported for the later versions of Liferay. That type of change is development, which is why our product team has created the following ticket for it: LPS-142165.
Workaround
The changes do propagate and no errors are thrown if
- the friendly URL field is left empty or UNTRANSLATED
- the friendly URL is different from the default translation
Upcoming Changes
This behavior will be changed in an upcoming fix pack. This change will disable adding translations that are equal to the original. For further details, please view the following ticket: LPS-141974.