Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

cq:lastReplicated property is not available in publish instance.

Avatar

Level 3

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?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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



Arun Patidar

View solution in original post

12 Replies

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?

 

Avatar

Community Advisor

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


Aanchal Sikka

Avatar

Level 3

Hi @aanchal-sikka 

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?

 

Avatar

Community Advisor

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


Aanchal Sikka

Avatar

Level 3

Hi @aanchal-sikka 

 

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?

 

Avatar

Community Advisor

Hello @sethia_varsha 

 

Please try on local env. Behaviour should be the same


Aanchal Sikka

Avatar

Level 3

Hi @aanchal-sikka 

 

I tried, still the same.

Anyways, I'm using CRX to check the metadata properties.

Avatar

Correct answer by
Community Advisor

@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



Arun Patidar

Avatar

Level 3

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?

Avatar

Administrator

@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.



Kautuk Sahni

Avatar

Level 3

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.