Legacy Knowledge Base
Published Jul. 2, 2025

Site Template propagation fails with "MySQLIntegrityConstraintViolationException: Duplicate entry" error

Written By

Rita Schaff

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

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.

    default_translation_typed.gif

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.

Did this article resolve your issue ?

Legacy Knowledge Base