Expand my Community achievements bar.

SOLVED

Content Fragment Move Operation Does Not Update Modified Date When Title and Slug are Edited

Avatar

Level 1

Dear AEM Experience Blog community,

 

I have encountered an issue related to the Content Fragment (CF) Move operation in Adobe Experience Manager (AEM). Specifically, I have observed that when I move a Content Fragment to another folder and also edit its Title and Slug, the Modified Date of the Content Fragment does not get updated.

This behavior is unexpected, as modifying the Title and Slug typically signifies a change in the content itself, and thus, the Modified Date should reflect this update. However, the Modified Date remains unchanged after the Move operation.

 

I would like to understand if this is the intended behavior or if it is a known issue. Additionally, I am seeking guidance on any potential workarounds or solutions to ensure that the Modified Date accurately reflects changes made to the Title and Slug of a Content Fragment during a Move operation.

 

I would appreciate any insights, suggestions, or experiences shared by the AEM Experience Blog community regarding this matter.

Thank you in advance for your assistance!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @AnveshReddy - 

 

The behavior you have described regarding the Content Fragment Move operation in AEM is indeed an intended behavior. When you move a Content Fragment to another folder and edit its Title and Slug, the Modified Date of the Content Fragment does not get updated. This behavior is by design and is not considered a bug or an issue.

 

  • The reason behind this behavior is that the Modified Date is primarily meant to reflect changes made to the content of the Content Fragment, rather than changes to metadata such as the Title and Slug.
  • Moving a Content Fragment to another folder and modifying its Title and Slug are considered metadata changes and are not considered significant enough to trigger an update to the Modified Date.
  • If you specifically require the Modified Date to be updated when moving a Content Fragment or modifying its metadata, you would need to implement a custom solution to achieve this functionality.

 

One possible workaround would be to leverage AEM's Event Handling to capture the move and metadata changes and then programmatically update the Modified Date property of the Content Fragment accordingly.

 

  • You can create a custom event handler that listens for the relevant events, such as `com/day/cq/wcm/core/events/MovedEvent` and `com/day/cq/wcm/core/events/PageEvent`, and then implement the necessary logic to update the Modified Date property based on the metadata changes.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @AnveshReddy - 

 

The behavior you have described regarding the Content Fragment Move operation in AEM is indeed an intended behavior. When you move a Content Fragment to another folder and edit its Title and Slug, the Modified Date of the Content Fragment does not get updated. This behavior is by design and is not considered a bug or an issue.

 

  • The reason behind this behavior is that the Modified Date is primarily meant to reflect changes made to the content of the Content Fragment, rather than changes to metadata such as the Title and Slug.
  • Moving a Content Fragment to another folder and modifying its Title and Slug are considered metadata changes and are not considered significant enough to trigger an update to the Modified Date.
  • If you specifically require the Modified Date to be updated when moving a Content Fragment or modifying its metadata, you would need to implement a custom solution to achieve this functionality.

 

One possible workaround would be to leverage AEM's Event Handling to capture the move and metadata changes and then programmatically update the Modified Date property of the Content Fragment accordingly.

 

  • You can create a custom event handler that listens for the relevant events, such as `com/day/cq/wcm/core/events/MovedEvent` and `com/day/cq/wcm/core/events/PageEvent`, and then implement the necessary logic to update the Modified Date property based on the metadata changes.