Are there any utilities for "touch"ing a node in CQ 5? | Community
Skip to main content
LinearGradient
Level 6
October 16, 2015
Solved

Are there any utilities for "touch"ing a node in CQ 5?

  • October 16, 2015
  • 1 reply
  • 570 views

Hi,

In CQ, some nodes use cq:lastModified, cq:lastModifiedBy, etc. to store the last modification time stamp and user.

Some other nodes use jcr:lastModified, jcr:lastModifiedBy, etc. to store that information.

If we edit a node, for example a node of type "cq:Page", using the JCR API and save it, cq:lastModified, cq:lastModifiedBy won't be updated to reflect the change.

We have written a utility class to work around this issue, but is there a built-in way to update the correct set of modification metadata properties when a node is saved/updated?

Thanks.

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

OOB will update cq:lastModified, cq:lastModifiedBy correctly & if that is not the case file a daycare with reproduce scenario.  The jcr api is low level api & Page & asset api are high level and might set the additional properties to take of other use cases. SO there might be difference on how you are saving. 

For your custom usecase write an listener & update desired properties accordingly.
  

1 reply

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

OOB will update cq:lastModified, cq:lastModifiedBy correctly & if that is not the case file a daycare with reproduce scenario.  The jcr api is low level api & Page & asset api are high level and might set the additional properties to take of other use cases. SO there might be difference on how you are saving. 

For your custom usecase write an listener & update desired properties accordingly.