Expand my Community achievements bar.

SOLVED

AEM 6.5 | Remove unwanted properties

Avatar

Level 4

Hi Everyone,

 

I could see a few unwanted properties like cq:lastModified, cq:lastReplicated, cq:lastReplicatedBy automatically added for every node. I tried deleting it manually for my website Content Fragment models but after changing anything it got added again. Is there any setting using which I can stop adding these properties every time?

 

MukeshAEM_1-1667204703060.png

 

Thanks.

Mukesh

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi @MukeshAEM 

That's great, now cq:lastReplicated, cq:lastReplicatedBy properties has been stopped getting added automatically.

 

For cq:lastModified, just to double check can you please validate if no event is getting triggered from project bundle (which is adding these properties) by stopping project bundle as suggested by @arunpatidar 

 

However, I have verified in vanilla instance that cq:lastModified added only to jcr:content node of content fragment models and not its parent nodes.

 

Also, please check if any customized workflow adding this property e.g., DAM Set modified date workflow OOTB adds such property but on specific DAM path.

View solution in original post

6 Replies

Avatar

Community Advisor

Hi,

I think you have an Event listener which adding this properties on modification. Please disable your bundle and check again if properties are added or not. If not that means you have custom logic to do that.

 

Also try in vanilla instance.

 



Arun Patidar

Avatar

Level 4

Thanks for your prompt response. We don't have any custom event handler written in the project. I'm thinking it's an OOTB feature of AEM 6.5 or might be configured somewhere to add these properties.

Avatar

Level 5

Please check if replication queue is blocked, if it is please clear it 

Avatar

Level 4

Hi @Chandra_Hire, replication queue was indeed blocked and I believe this was the reason why AEM was adding replication properties. Now the main question is what can I do to stop AEM from adding properties cq:lastModified and cq:lastModifiedBy? It got added after any change in a content fragment model.

Avatar

Correct answer by
Level 5

Hi @MukeshAEM 

That's great, now cq:lastReplicated, cq:lastReplicatedBy properties has been stopped getting added automatically.

 

For cq:lastModified, just to double check can you please validate if no event is getting triggered from project bundle (which is adding these properties) by stopping project bundle as suggested by @arunpatidar 

 

However, I have verified in vanilla instance that cq:lastModified added only to jcr:content node of content fragment models and not its parent nodes.

 

Also, please check if any customized workflow adding this property e.g., DAM Set modified date workflow OOTB adds such property but on specific DAM path.

Avatar

Community Advisor

Hi @MukeshAEM 

To remove the above properties from all the pages or assets. The groovy console can be used to remove property in bulk.

https://github.com/CID15/aem-groovy-console

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/groovy-console-in-aem-as-a...

 

But that is not allowed. It’s considered a security risk to inject code at runtime that is not validated by CM

 

You can write Java servlets that trigger async jobs (pure servlets time out after 1min).