cq:tags error "com.day.cq.tagging.impl.TagValidatingEventListener invalid/duplicated tags detected at content/"

1.2k views Asked by At

I am setting a node property "cq:tags" in form of String array. My java code sets this property upon node creation. But this gives me error and the "cq:tags" property gets stored as a blank String array. The error is: com.day.cq.tagging.impl.TagValidatingEventListener invalid/duplicated tags detected at content/...

Can someone please help on this? Thanks in advance.

2

There are 2 answers

0
Imran Saeed On BEST ANSWER

In general you will see this error when your tag is invalid and not defined under /etc/tags

The error message normally gives you more details on the specific tag which was invalid and cannot be resolved. Make sure you have your tags defined under /etc/tags

Also note that the tag is full path for cq:tags property, so for example, if you have a tag defined at /etc/tags/facebook then your cq:tags should have /etc/tags/facebook. Using just 'facebook' as a tag value will cause the error that you are seeing.

0
mickleroy On

Make sure the node you are attempting to tag has the cq:Taggable mixin set. https://docs.adobe.com/docs/en/aem/6-2/develop/tags/framework.html#Taggable%20Content%20:%20cq:Taggable%20Mixin

Also make sure that the tag you are using is defined under /etc/tags.