cq:tags property for pages is not saved correctly in the JCR in AEM 6.2 | Community
Skip to main content
julianhs2024
Level 2
December 12, 2016

cq:tags property for pages is not saved correctly in the JCR in AEM 6.2

  • December 12, 2016
  • 4 replies
  • 14398 views

Hello! guys

In the project that I am working on, I noticed that the property of "cq:tags" (OOTB in AEM) in pages is not working as expected.  After save the dialog (page properties) it seems that a POST request is sent to the jcr:content node of the page with the value selected but then seems that a listener or something in the core of AEM is trying to delete the value on this property.  I figured out in the log and found this: *INFO* [sling-oak-observation-552] com.day.cq.tagging.impl.TagValidatingEventListener invalid/duplicated tags detected at /content/project/relative_path/page/jcr:content/cq:tags modified by user8923: 'namespace:name/23235' => ''

But I really do not know why is trying to delete the value, because first, the tag exist because is selected from the wizard dialog for tags and is not duplicated.

So, it seems that the property value is deleted after and for this reason the cq:tags in the JCR is saved as empty string.

Could anybody help me to have an initial possible solution or maybe identify if this is an issue in AEM 6.2  ?

Thank you very much!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Feike_Visser1
Adobe Employee
Adobe Employee
December 12, 2016

Looks like you are using invalid tags, anyway we can reproduce this?

julianhs2024
Level 2
December 12, 2016

Can you give me what is needed to have a valid tag in AEM 6.2 (I attached an image with all the properties that we have for tags)

And my concern is that I think the tags are valid because in the Tags/Keywords field (page properties) I can see all the tags with the correct structure, maybe is something with the TagValidatingEventListener. Is good idea deactivate this component ? 

Thanks!

julianhs2024
Level 2
December 12, 2016

I figured out that if I deactivate this service Day CQ Tagging Service. The cq:tags property are correctly saved in JCR and works fine, maybe this service is called in TagValidatingEventListener and what is the propouse of this service? is good idea inactivate it ?  

I am wondering if maybe we have built the tags in the wrong way, however I tried with the geometrixx tags and are not persisted.

Please let me know  any thoughts on this.

Regards

Jitendra_S_Toma
Level 10
June 4, 2017

Hi,

If there is a already existing invalid tag at the cq:tags property under jcr content and trying to append another valid tag. this might be the issue.

i would recommend to clean up cq tags at the page level manually through crxde and then try it.

June 5, 2017

We cleaned up our tags and made sure everything is valid. Still seeing this issue though.

VeenaVikraman
Community Advisor
Community Advisor
June 5, 2017

Can you be specific on what exact issue you are facing. A sample and error log would help to guide you

Thanks

Veena

VeenaVikraman
Community Advisor
Community Advisor
June 6, 2017

Hi Julian/ Shahbaz

    My next question would have been to provide the tag values to validate if it is valid . Guess Shahbaz answered before even I threw that at you . But still will it be possible to provide a sample tag you guys are adding? I will try to reproduce it locally.

      If this is 6.3 issue, we may need Adobe help to see if this is a bug. May be Feike Visser​ , smacdonald2008Sham HCkautuksahni​ could help

Thanks

Veena

julianhs2024
Level 2
June 7, 2017

Hi Veena,

Actually in AEM 6.2 the issue is reproducible.  On the tags that we have, I can not send to you for business restrictions, but the all the tags follows this pattern:

TagID:

project:id/id/id ...

e.g:

-aem:34513/12345

We do not have repeated tagIDs persisted, so I really do not know why this issue ocurred.

Any help will be appreciated.  That's why I disable the Tag Validation Listener in order to not loss the tags persisted like page properties.

Thanks,

Julian

June 7, 2017

I am also seeing this issue on AEM 6.3

Level 1
October 18, 2017

I found this same issue on an environment that had been updated from 6.0 to 6.2.  They had their own ACL permission package that was overriding several OOTB rep:policy including the one for /etc/tags.

If the user tag-validation-service user does not have read access to /etc/tags, we get the same error about a duplicate tag.  Putting back the user tag-validation-service permissions fixed it.

Below is the full default ACL list for /etc/tag.

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:crx="http://www.day.com/crx/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"

    jcr:primaryType="rep:ACL">

    <allow

        jcr:primaryType="rep:GrantACE"

        rep:principalName="tag-administrators"

        rep:privileges="{Name}[jcr:versionManagement,jcr:modifyAccessControl,jcr:read,jcr:readAccessControl,crx:replicate,rep:write,jcr:lockManagement]"/>

    <allow0

        jcr:primaryType="rep:GrantACE"

        rep:principalName="everyone"

        rep:privileges="{Name}[jcr:read]">

        <rep:restrictions

            jcr:primaryType="rep:Restrictions"

            rep:glob=""/>

    </allow0>

    <allow1

        jcr:primaryType="rep:GrantACE"

        rep:principalName="tag-garbage-collection-service"

        rep:privileges="{Name}[jcr:read,crx:replicate,rep:write]"/>

    <allow2

        jcr:primaryType="rep:GrantACE"

        rep:principalName="tag-validation-service"

        rep:privileges="{Name}[jcr:read]"/>

    <allow3

        jcr:primaryType="rep:GrantACE"

        rep:principalName="translation-job-service"

        rep:privileges="{Name}[jcr:modifyProperties,jcr:read]"/>

    <allow4

        jcr:primaryType="rep:GrantACE"

        rep:principalName="dam-replication-service"

        rep:privileges="{Name}[jcr:modifyAccessControl,jcr:modifyProperties,jcr:read,crx:replicate,jcr:readAccessControl]"/>

</jcr:root>