Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Content Migration - Templates problem

Avatar

Level 4

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

Avatar

Correct answer by
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

Avatar

Correct answer by
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

Avatar

Community Advisor

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

Avatar

Community Advisor

Hi,

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

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



Arun Patidar