Ad Code

Sunday, April 14, 2019

Migration of Tags from AEM 6.2 to AEM 6.4


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.
Replace the references to the old model (/etc/tags) with the new one (/content/cq:tags) by using the tagID.

  • 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.

4 comments:

  1. We are migrating from aem 6.2 to aem 6.4, I am facing this problem, we have overlayed few components in 6.2 now that components are under internal area in 6.4. According to aem 6.4 we should not overlay aem internal components. I want to keep this overlay function in 6.4 as well, Is there anyway to do it. Suggest something please. Thanks

    ReplyDelete
  2. Can you post full step by step video of upgrading from 6.3 to 6.5

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This is really nice and informative post, I love this content also visit Google Search Api. Thanks for sharing.

    ReplyDelete