I've a requirement to show the last 3 replicated assets every time a particular page is loaded. I can do so in author by using the 'cq:lastReplicated' property, but I don't see this property in publisher. However I saw a property called 'cq:lastReplicated_publish' in AEM publish, but it doesn't get updated based on the publication time. Is there another property in publisher that gets updated whenever an asset is published?
Solved! Go to Solution.
Views
Replies
Total Likes
@sethia_varsha
cq:lastReplicationAction, cq:lastreplicated and cq:lastReplicatedBy properties are not carried over to publish by design.
In order to carry over these properties disable the below component in author instance: com.day.cq.replication.impl.ReplicationPropertiesFilterFactory
Hello @Saravanan_Dharmaraj
Thanks for your reply!
I've gone through the link, but the concern in using ' jcr:created' property is that it doesn't get updated if an asset is republished (publishing an already published asset).
Is there a property that gets updated when an asset is republished?
Hello @sethia_varsha
cq:Replicated properties are only for Author, since they are used in terms of replication.
A publish is Author = Create in publish
An unpublish in Author = Delete in publish
Thus, you can use jcr:created on Publish Instance
Thanks for your reply!
The concern in using ' jcr:created' property is that it doesn't get updated if an asset is republished (publishing an already published asset).
Is there a property that gets updated when an asset is republished?
Hello @sethia_varsha
I would suggest to check the metadata via http://localhost:4502/content/dam/abc.infinity.json
You should be able to identify, the metadata changes on subsequent replication.
Just append .infinity.json to the publish URL of asset and compare the 2 json
I was able to append .infinity.json and get the metadata in author environment, but the same is not working in publish env.
Can you confirm if you're able to get the metadata in publish env?
@sethia_varsha
cq:lastReplicationAction, cq:lastreplicated and cq:lastReplicatedBy properties are not carried over to publish by design.
In order to carry over these properties disable the below component in author instance: com.day.cq.replication.impl.ReplicationPropertiesFilterFactory
Hi @arunpatidar
Thanks for your reply!
I've disabled the component in local and it seems to work as expected. However can I deploy this to higher environments? and if yes, how can I do it?
@sethia_varsha Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hello @arunpatidar @aanchal-sikka @Saravanan_Dharmaraj @kautuk_sahni
Thank you all for your replies!
I've noticed that '@jcr:content/renditions/original/jcr:created' property is updated in publisher with the latest date every time an asset is republished from author to publisher.