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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Content Migration - Templates problem

AD-Engineer
Level 3
Level 3

Hi,

Hope you are doing well!

We are trying to migrate content from dev to cloud server. For this we are using Content Migration from AEM (please, find attached). But, every time we migrate content, the templates or any of updated on them are not migrated. Also when I ran this command mvn clean install -PautoInstallSinglePackage all the new templates are removed. I would really appreciate your help on this!

1 Accepted Solution
asutosh_jena
Correct answer by
Community Advisor
Community Advisor

Hi @AD-Engineer 

 

Templates and template related settings are stored under /conf/{your-project}/settings/wcm node in crx and the same should be checked in via code which will be kept under ui.content package as per the latest maven archetype code.

 

if you are making any change to the template, and then deploying the code and the updated changes are not available in your code, then the build will remove all the changes that you have made on the server.

 

So everytime you make any changes to the template or component related policy, make sure to pull those changes into your code using vlt or any other plugin such as intellivault, and checkin those code so that the next deployment, the changes will be deployed along with code and will not be removed from the server. Also the same will be deployed to all the upper environments including the cloud instance.

 

When you use mvn clean install -PautoInstallSinglePackage command it will deploy the complete code base into the cloud or the instance.

 

In your code base, ui.content filter.xml should have the below code:

 

<workspaceFilter version="1.0">
<filter root="/conf/{your-project-name}"/>
</workspaceFilter>

 

As part of the content package you just need to mode the site content which can be deployed manually on the cloud.

 

Hope this helps!

 

Thanks

View solution in original post

3 Replies
asutosh_jena
Correct answer by
Community Advisor
Community Advisor

Hi @AD-Engineer 

 

Templates and template related settings are stored under /conf/{your-project}/settings/wcm node in crx and the same should be checked in via code which will be kept under ui.content package as per the latest maven archetype code.

 

if you are making any change to the template, and then deploying the code and the updated changes are not available in your code, then the build will remove all the changes that you have made on the server.

 

So everytime you make any changes to the template or component related policy, make sure to pull those changes into your code using vlt or any other plugin such as intellivault, and checkin those code so that the next deployment, the changes will be deployed along with code and will not be removed from the server. Also the same will be deployed to all the upper environments including the cloud instance.

 

When you use mvn clean install -PautoInstallSinglePackage command it will deploy the complete code base into the cloud or the instance.

 

In your code base, ui.content filter.xml should have the below code:

 

<workspaceFilter version="1.0">
<filter root="/conf/{your-project-name}"/>
</workspaceFilter>

 

As part of the content package you just need to mode the site content which can be deployed manually on the cloud.

 

Hope this helps!

 

Thanks

View solution in original post

Prince_Shivhare
Level 9
Level 9

Hi @AD-Engineer ,

 

Can you please confirm what is written on filter.xml which you can find under the META-INF/vault/filter.xml

 

mode should be merge if you want to merge the changes.

 

<workspaceFilter version="1.0">
<filter root="/conf/project" mode="merge"/>
</workspaceFilter>

 

Thanks,

Prince

Arun_Patidar
Community Advisor
Community Advisor

Hi,

Please check the filter.xml in ui.content package against below rules.

https://jackrabbit.apache.org/filevault/filter.html