Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Duplicate tags after move operation in AEM 6.3 publish

Avatar

Level 6

Hi All,

We are facing this issue in AEM 6.3 GA.

Steps to reproduce:

  • Create a new tag under We-Retail (/etc/tags/we-retail).
  • Move the tag to under Activity and Publish.

1837716_pastedImage_1.png

  • Notice Test is duplicated in Publish.

1837913_pastedImage_6.png

  • When moving a default tag into a container tag, I can see cq:movedTo and cq:backlinks being set on the nodes.

1837914_pastedImage_11.png

1837915_pastedImage_12.png

  • But when I move a tag from within a container tag to outside, none of these properties are being set.

1837916_pastedImage_16.png

1837917_pastedImage_17.png

The behaviour is not consistent. Can someone please help?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Please check

Moving and Merging Tags

The following is a description of the effects in the repository when moving or merging tags using the Tagging console:

  • When a tag A is moved or merged into tag B under /etc/tags:
    • tag A is not deleted and gets a cq:movedTo property.
    • tag B is created (in case of a move) and gets a cq:backlinks property.
  • cq:movedTo points to tag B.
    This property means that tag A has been moved or merged into tag B. Moving tag B will update this property accordingly. Tag A is thus hidden and is only kept in the repository to resolve tag IDs in content nodes pointing to tag A. The tag garbage collector removes tags like tag A once no more content nodes point to them.
    A special value for the cq:movedTo property is nirvana: it is applied when the tag is deleted but cannot be removed from the repository because there are subtags with a cq:movedTo that must be kept.

Note: The "cq:movedTo" property is only added to the moved or merged tag if either of these conditions are met:
1. Tag is used in content (meaning it has a reference) OR
2. Tag has children that have already been moved.

  • cq:backlinks keeps the references in the other direction, i.e. it keeps a list of all the tags that have been moved to or merged with tag B. This is mostly required to keep cq:movedTo properties up to date when tag B is moved/merged/deleted as well or when tag B is activated, in which case all its backlinks tags must be activated as well.

Note: The "cq:backlinks" property is only added to the moved or merged tag if either of these conditions are met:
1. Tag is used in content (meaning it has a reference) OR
2. Tag has children that have already been moved.



Arun Patidar

View solution in original post

2 Replies

Avatar

Employee

Do you see the same behavior in the later service packs ?

Avatar

Correct answer by
Community Advisor

Please check

Moving and Merging Tags

The following is a description of the effects in the repository when moving or merging tags using the Tagging console:

  • When a tag A is moved or merged into tag B under /etc/tags:
    • tag A is not deleted and gets a cq:movedTo property.
    • tag B is created (in case of a move) and gets a cq:backlinks property.
  • cq:movedTo points to tag B.
    This property means that tag A has been moved or merged into tag B. Moving tag B will update this property accordingly. Tag A is thus hidden and is only kept in the repository to resolve tag IDs in content nodes pointing to tag A. The tag garbage collector removes tags like tag A once no more content nodes point to them.
    A special value for the cq:movedTo property is nirvana: it is applied when the tag is deleted but cannot be removed from the repository because there are subtags with a cq:movedTo that must be kept.

Note: The "cq:movedTo" property is only added to the moved or merged tag if either of these conditions are met:
1. Tag is used in content (meaning it has a reference) OR
2. Tag has children that have already been moved.

  • cq:backlinks keeps the references in the other direction, i.e. it keeps a list of all the tags that have been moved to or merged with tag B. This is mostly required to keep cq:movedTo properties up to date when tag B is moved/merged/deleted as well or when tag B is activated, in which case all its backlinks tags must be activated as well.

Note: The "cq:backlinks" property is only added to the moved or merged tag if either of these conditions are met:
1. Tag is used in content (meaning it has a reference) OR
2. Tag has children that have already been moved.



Arun Patidar