This article outlines the changes to Tags and Tag Sets between Liferay Portal 5.2 to Liferay Portal 6.0, and later versions.
Specifically:
- The changes to the Tags Navigation Portlet (Where Did Tag Sets Go?)
- How to migrate Tags to Categories and Tag Sets to Vocabularies.
Resolution
1. The changes to the Tags Navigation Portlet (Where Did the Tag Sets Go?)
In Liferay Portal 5.2, Tags could be organized into Tag Sets, which is an unstructured grouping called a folksonomy. The Tags Navigation portlet displayed Tags grouped by Tag Set. After upgrading to Liferay Portal 6.0, the Tags Navigation portlet only displays Tags and no longer displays Tag Sets. This is intended behavior, because starting with Liferay Portal 6.0, Tags Sets are replaced by Vocabularies.
During the upgrade process to Liferay Portal 6.0 and subsequent versions, Tag Sets are ignored and only Tags are included. Hence, the Tags Navigation portlet only displays Tags and no longer displays the Tag sets. The original Tag and Tag Set data is retained in the tagsentry and tagsvocabulary database tables.
2. How to migrate Tags to Categories and Tag Sets to Vocabularies.
Scenario 1:
- If the portal admin has not yet upgraded from 5.2.x EE to 6.0.x EE, the administrator can change the folksonomy value in the database for specific Tag Sets. Each Tag Set can be included or excluded from the upgrade process by changing the folksonomy value to 0 (false) or 1 (true) in the tags vocabulary table.
- Perform the upgrade.
- Tags and Tag Sets will be migrated and displayed as Vocabularies and Categories in the Category Navigation portlet for the Tag Sets where folksonomy was 0 (false) in the tagsvocabulary table. Tags will be displayed as Tags in the Tags Navigation portlet for Tag Sets where folksonomy was 1 (true) in the tagsvocabulary table.
Scenario 2:
- If the portal admin has already upgraded to 6.0.x EE or later version of the portal, there are two options:
- Perform the upgrade again, as per Scenario 1.
- Build and deploy a custom hook to migrate the original Tag and Tag Set data from the tagsentry and tagsvocabulary tables. The custom hook could override or extend “updateAssetCategories()” methods in Java class “com.liferay.portal.upgrade.v6_0_0.UpgradeAsset”.