mode="merge" in filter.xml not working for ACS Common Generic List | Community
Skip to main content
Shivam153
Level 3
March 21, 2023
Solved

mode="merge" in filter.xml not working for ACS Common Generic List

  • March 21, 2023
  • 6 replies
  • 4239 views

Hi, I am trying to use "merge" mode in filter.xml for acs common generic list. When I am adding a new entry, its not getting updated.

<filter root="/etc/acs-commons/lists" mode="merge"/>

Anyone has any context on this one?

Best answer by Jagadeesh_Prakash

@shivam153  It worked for me with below code. Can you provide the specific list in filter as shown below

 

<filter root="/etc/acs-commons/lists/xxxx/comparison_table_values" mode="merge"/>

 

6 replies

Jagadeesh_Prakash
Community Advisor
Jagadeesh_PrakashCommunity AdvisorAccepted solution
Community Advisor
March 21, 2023

@shivam153  It worked for me with below code. Can you provide the specific list in filter as shown below

 

<filter root="/etc/acs-commons/lists/xxxx/comparison_table_values" mode="merge"/>

 

Shivam153
Shivam153Author
Level 3
March 21, 2023

Hi @jagadeesh_prakash , I have tried this but its not working for me.

Himanshu_Jain
Community Advisor
Community Advisor
March 21, 2023

Can you share the acs commons version please.

Himanshu Jain
Shivam153
Shivam153Author
Level 3
March 21, 2023

Hi @himanshu_jain  Its 5.4.0

Himanshu_Jain
Community Advisor
Community Advisor
March 21, 2023

Try mode="merge_properties"

Himanshu Jain
Shivam153
Shivam153Author
Level 3
March 21, 2023

I am getting following error @himanshu_jain 

Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.6:generate-metadata (default-generate-metadata) on project single-app.ui.content: java.io.IOException: org.apache.jackrabbit.vault.fs.config.ConfigurationException: Invalid value given for attribute 'mode': No enum constant org.apache.jackrabbit.vault.fs.api.ImportMode.MERGE_PROPERTIES

 

 

Rohit_Utreja
Community Advisor
Community Advisor
March 21, 2023

@shivam153 

try using 'merge_properties' in the filter xml.

merge has been Deprecated, as not handled consistently, use merge_properties instead, based on the doc below.

https://jackrabbit.apache.org/filevault/filter.html#:~:text=update_properties%3A%20Existing%20content%20is%20updated%2C%20new%20content%20is%20added%20and%20none%20is%20deleted

Shivam153
Shivam153Author
Level 3
March 21, 2023

I am getting following error when used this:

Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.6:generate-metadata (default-generate-metadata) on project single-app.ui.content: java.io.IOException: org.apache.jackrabbit.vault.fs.config.ConfigurationException: Invalid value given for attribute 'mode': No enum constant org.apache.jackrabbit.vault.fs.api.ImportMode.MERGE_PROPERTIES

AMANATH_ULLAH
Community Advisor
Community Advisor
March 26, 2023

@shivam153 

 

Try using mode="update". It should fix your issue

Amanath Ullah
March 18, 2024

@shivam153  Did you find any solution to this issue?

 

Even the new variant mode="merge_properties" is throwing an error.

 

@amanath_ullah Mode=update will override all the changed value on the console.