Hello Everyone,
Before some weeks I got an opportunity to migrate an AEM 6.2 project to AEM 6.4 and
here in this blog I will focus on how I migrated my tags from AEM 6.2 to 6.4 or higher version.
You must be aware that till AEM 6.3, the hierarchy of tags was “/etc/tags" and from AEM 6.4 its hierarchy has been changed to “/content/cq:tags”.
So how to migrate tags from "/etc/tags" to "/content/cq:tags"?
- The Tag Manager API supports both the legacy and the new location. When the JCR Tag Manager Factory OSGi Component starts, it detects if it is running on an upgraded instance or a legacy one, and uses the appropriate location.
- The TagManager API takes the tags as per precedence and obviously “/etc/tags” has higher precedence. If there are tags available in “/etc/tags” then Tag Manager api will be working with “/etc/tags” location and you don't need to change anything.
- It is recommended if you are upgrading system you should upgrade the tags location also and you can directly copy and paste tags under “/content/cq:tags” and it will not impact any tagged pages as tagpicker never stores the absolute path. It stores the relative path.
- Log in to CRXDE Lite.
- Move the tags from "/etc/tags" to "/content/cq:tags".
- Restart the OSGi Component “com.day.cq.tagging.impl.JcrTagManagerFactoryImpl”.
Note:Important to note here the Tagging Console will also show the tags as per the precedence of the hierarchy.If AEM contains the “/etc/tags” hierarchy then the tagging console will show the tags under this hierarchy else it will show the tags under “/content/cq:tags”.
Again if it is not showing as per the expectation you need to follow step 3 mentioned above.
Issue in Migrating Content from one environment to another in AEM 6.4
While migrating the content from one environment to another environment, I noticed that If
you have pages tagged with tags,and then you need to migrate content, always migrate
tags first and then pages because Pages loose the tags information if the tags are not
already available in environment and this may lead to a serious issue if we lose data.
I notice this thing in AEM 6.4 , I am not sure if it is with other versions of AEM, so
always migrate tags before you migrate pages.
If you have any query or suggestion then kindly comment or mail us at sgaem.blog02@gmail.com
Hope it will help you guys !!
Thanks and Happy Learning.