How to retain jcr:created date while installing content package in AEM instance? | Community
Skip to main content
Level 4
September 11, 2024
Solved

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

  • September 11, 2024
  • 2 replies
  • 917 views

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.

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 arunpatidar

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

with merge mode, it should work for existing content.

2 replies

pulkitvashisth
Community Advisor
Community Advisor
September 11, 2024

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">

 

Level 4
September 12, 2024

Hi @pulkitvashisth ,

 

Thanks for your response.

I'm not deploying through code.

I'm installing a content package.

 

Thanks,

Raju.

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
September 11, 2024

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

with merge mode, it should work for existing content.

Arun Patidar
Level 4
September 12, 2024

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.