I made below changes in filter.xml file:
<filter root="/etc/msm/rolloutconfigs/" mode="update"/>
There are certain rollout-configs listed under path /etc/msm/rolloutconfigs
/etc/msm/rolloutconfigs/rollout-config-sample has some value for 'editMap' property at editProperties node ( /etc/msm/rolloutconfigs/rollout-config-dealer/jcr:content/editProperties).
rollout-config-sample is not part of the code base and I did some modification in editMap value for which I created a package and Installed on the server. After each deployment, my modified value gets overwritten even though I've set mode="update".
I was expecting it to add the new content while keeping the existing value in place.
Could anyone please help me understand why mode="update" didn't work as expected here or I understood it wrong?
Solved! Go to Solution.
Views
Replies
Total Likes
Just replace mode ="merge"
Hi @MeenuRajput, I think what you should try mode="merge". I think the update mode is working as expected.
update : Existing content is updated, new content is added and none is deleted.
Please find more information about each mode under https://jackrabbit.apache.org/filevault/filter.html#Filter_Elements
Hi @lukasz-m Thanks for you response. With mode="update" We expect that Existing content is updated, new content is added and none is deleted.
Before update, I also tried merge on a particular filter path like
<filter root="/etc/msm/rolloutconfigs/rollout-config-dealer" mode="merge"/>
With this, once I deployed the code, it was completely deleting the "/etc/msm/rolloutconfigs/rollout-config-dealer" node from /etc/msm/rolloutconfigs/ path.
@MeenuRajputcould you please share list of all filters related to /etc that you are using in your package?
In the filter.xml, I added the update mode on the parent level folder as below :
<filter root="/etc/msm/rolloutconfigs/" mode="update"/>
In crx, I've list of nodes under /etc/msm/rolloutconfigs like
/etc/msm/rolloutconfigs/rollout-config-sample
/etc/msm/rolloutconfigs/dk-dealers-rollout-sample1
/etc/msm/rolloutconfigs/dk-dealers-rollout-sample2
Out of above mentioned configs, '/etc/msm/rolloutconfigs/rollout-config-sample' is not part of code base, since I made some modifications in editMap value and wanted it to persist after code deployment, I created a package of '/etc/msm/rolloutconfigs/rollout-config-sample', and installed on AEM server. After this step, when I deployed code from my branch which doesn't include '/etc/msm/rolloutconfigs/rollout-config-sample' , I expected the modified value at this node to persist as I modified my filter.xml.
But as an output, changes that I made at /etc/msm/rolloutconfigs/rollout-config-sample/jcr:content/editProperties node in editMap property was reverted to previous value (Excluding my changes).
I don't understand why mode update didn't play it's role here. However I was able to make it work by completely removing any type of mode from filter.xml and adding the code for "/etc/msm/rolloutconfigs/rollout-config-sample/jcr:content/editProperties" in the code base.
This is weird. What else came into my mind is to use exclude option. So your filter could look like this:
<filter root="/etc/msm/rolloutconfigs" mode="merge">
<exclude pattern="/etc/msm/rolloutconfigs/rollout-config-sample" />
</filter>
Just replace mode ="merge"
My issue is somewhat similar.
I want to preserve what is here:
<filter root="/apps/cq/core/content/nav/tools" mode="merge"/>
Building the app, there is an error stating
"Filter root's ancestor '/apps/cq/core' is not covered by any of the specified dependencies.".
When I add all of those to the filter, I still don't get the mode="merge" flag set in the UI.
Views
Replies
Total Likes