Adding version on asset publish | Community
Skip to main content
Level 3
November 17, 2022
Solved

Adding version on asset publish

  • November 17, 2022
  • 1 reply
  • 654 views

Hi,

Noticed that version is not created on publishing an Asset and content fragment. It is getting created on publishing a page. How can we add a version during publishing an asset?

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 krati_garg

Versioning in Assets and Pages work separately.

A version is not created on Asset Publish, this is default or OOTB behavior of Assets in AEM.

 

You might need a simple custom solution, where you can listen to the replication events of your assets and add the logic to create Asset version programmatically.

Below link can become handy in creating a version programmatically:

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/adobe/granite/asset/api/AssetVersion.html

@ashwin_raju  

1 reply

krati_garg
Adobe Employee
krati_gargAdobe EmployeeAccepted solution
Adobe Employee
November 17, 2022

Versioning in Assets and Pages work separately.

A version is not created on Asset Publish, this is default or OOTB behavior of Assets in AEM.

 

You might need a simple custom solution, where you can listen to the replication events of your assets and add the logic to create Asset version programmatically.

Below link can become handy in creating a version programmatically:

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/adobe/granite/asset/api/AssetVersion.html

@ashwin_raju