Duplicate Tag Exception while Publishing a portlet on a migrated System
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
learn-legacy-article-disclaimer-text
Resolution
- Create a portlet-ext.properties file in
[Liferay_Home]/tomcat-9.0.17/webapps/ROOT/WEB-INF/classes
-
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