Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Difference between fragmentlastsave and jcr:lastModifed date in content fragment

Magesh06
Level 2
Level 2

While working on AEM Content Fragments we noticed that there is a new jcr property which is "fragmentlastsave" and trying to figure out the purpose of this property. The value getting stored is same as value stored as part of jcr:lastModifed date. Any can provide the justification for this? 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution
Theo_Pendle
Correct answer by
Community Advisor
Community Advisor

I couldn't tell you exactly when jcr:lastModified might be used vs lastFragmentSave within AEM's internal logic.

What I can say is that lastFragmentSave is the a timestamp indicating the last time at which original fragment was saved, whereas jcr:lastModified is a more generic timestamp that indicates when the resource as a whole was last modified.

You can see the difference between these two concepts when you create a variation of a fragment:

Selection_098.png

The original fragment doesn't change so lastFragmentSave isn't updated.

However, the creation of a variation is an update of the resource, so jcr:lastModified is updated 🙂

In this screenshot you can see that, in this example,  the two are about a minute a part.

theop76211228_0-1586206187864.png

 

View solution in original post

3 Replies
Theo_Pendle
Correct answer by
Community Advisor
Community Advisor

I couldn't tell you exactly when jcr:lastModified might be used vs lastFragmentSave within AEM's internal logic.

What I can say is that lastFragmentSave is the a timestamp indicating the last time at which original fragment was saved, whereas jcr:lastModified is a more generic timestamp that indicates when the resource as a whole was last modified.

You can see the difference between these two concepts when you create a variation of a fragment:

Selection_098.png

The original fragment doesn't change so lastFragmentSave isn't updated.

However, the creation of a variation is an update of the resource, so jcr:lastModified is updated 🙂

In this screenshot you can see that, in this example,  the two are about a minute a part.

theop76211228_0-1586206187864.png

 

View solution in original post

Magesh06
Level 2
Level 2
I suspected this and created a variation but it's strange that still both the timestamps are getting updated with same value on my instance. I'm using 6.4
Theo_Pendle
Community Advisor
Community Advisor
Well to be honest I'm not sure this is a critically important point, but just for the fun of it: when you create a variation, if you DON'T click on save, it should update only jcr:lastModified 😛