Expand my Community achievements bar.

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

How to retain jcr:created date while installing content package in AEM instance?

Avatar

Level 4

Hi All,

 

I got a content package to install in my AEM instance. But, i want to retain the 'jcr:created' date of content. (should be same as the one in package).

I tried by modifying 'filter.xml' of package, adding merge="true" to filter and recreated package, installed but it didn't work.

Update - tried below way also, but didn't help

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/content/dam/abc/magazine-archive-folder" merge="true">
<exclude pattern="/content/dam/abc/.*(@jcr:created|@jcr:createdBy|@jcr:lastModified|@jcr:lastModifiedBy)" />
</filter>
</workspaceFilter>

Thanks,

Raju.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Rajumuddana 
Seems it is not possible if the content is new.

with merge mode, it should work for existing content.



Arun Patidar

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @Rajumuddana 
If you are deploying via code, you can remove jcr:created date from the content xml in code and use mode="merge"

<filter root="/content/dam/abc/magazine-archive-folder" mode="merge">

 

Avatar

Level 4

Hi @pulkitvashisth ,

 

Thanks for your response.

I'm not deploying through code.

I'm installing a content package.

 

Thanks,

Raju.

Avatar

Correct answer by
Community Advisor

Hi @Rajumuddana 
Seems it is not possible if the content is new.

with merge mode, it should work for existing content.



Arun Patidar

Avatar

Level 4

Hi @arunpatidar ,

 

Thanks for your reply.

 

Lets assume, i installed the same package twice, that time the content become existed already.

Either case, my 'jcr:created' time from package is not retained after installing rather the existed 'jcr:created' time (in crx/de) is not modified with the filter.

You may be correct.

 

Thanks,

Raju.