Legacy Knowledge Base
Published Jul. 2, 2025

Duplicate Tag Exception while Publishing a portlet on a migrated System

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

  • After having upgraded from 6.2 to DXP Cloud or Liferay DXP 7.0+ with staging enabled and tagged web content articles, trying to publish the articles to Live results in the following error:
    An unexpected error occurred with the publication process. Please check your portal and publishing configuration.

    The Tag tagname could not be imported because of the following error: A tag with the name tagname (duplicate) already exists.

Environment

  • DXP 7.0+

Resolution

  1. Create a portlet-ext.properties file in
    [Liferay_Home]/tomcat-9.0.17/webapps/ROOT/WEB-INF/classes
  2. Add the following line:
    staging.merge.tags.by.name=true
  • This property is set to false by default because there are a couple of examples where merging the tags could potentially become a problem.
    E.g.:
    • There is a tag - belonging to an asset - that was already imported once.
      It is possible that the imported tag is renamed on the target site, and a similar one is created again. Then, you can decide to reimport the .lar file. If the property is set to
      false​, reimporting the .lar file will not change the tag (that belongs to the asset), the old (renamed) one will remain.
    • Tags are identified using their UUID, so the property ignores those and uses the name to identify the tags during the import.
      Most entities in Liferay are identified based on their UUID, so having an option to use names instead is not considered default.
Did this article resolve your issue ?

Legacy Knowledge Base