Uploaded image for project: 'Jackrabbit FileVault'
  1. Jackrabbit FileVault
  2. JCRVLT-519

Filter with explicit include/exclude definitions still overwrites existing properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.4.0
    • None
    • None
    • None

    Description

      I need to update just a given set of properties within a configuration node, leacing both children nodes and previously existing properties unchanged.

      So, when having a previously existing configuration as the one present in testConfiguration.zip if we try to load the file jcr_root/conf/test/_sling_configs/TestConfiguration/.content.xml .content.xml with a content like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
                jcr:primaryType="cq:Page">
          <jcr:content
                  jcr:primaryType="cq:PageContent"
                  property1="1.changed">
          </jcr:content>
      </jcr:root>
      
      

      ... using this filter definition like this filter.xml :

      <?xml version="1.0" encoding="UTF-8"?>
      <workspaceFilter version="1.0">
          <filter root="/conf/test" mode="update">
              <exclude pattern="/conf/test/sling:configs/TestConfiguration/jcr:content(/.*)?" matchProperties="true"/>
              <include pattern="/conf/test/sling:configs/TestConfiguration/jcr:content/property1" matchProperties="true"/>
          </filter>
      </workspaceFilter>
      

      ... we have an undesired result: It's keeping the child nodes intact but the jcr:content is being completely overridden:

      Attachments

        1. testConfiguration.zip
          6 kB
          Iago Amorín Fernández
        2. .content.xml
          0.4 kB
          Iago Amorín Fernández
        3. filter.xml
          0.4 kB
          Iago Amorín Fernández
        4. Captura de pantalla 2021-05-10 a las 13.43.09.png
          193 kB
          Iago Amorín Fernández
        5. Captura de pantalla 2021-05-11 a las 14.18.51.png
          17 kB
          Iago Amorín Fernández

        Issue Links

          Activity

            People

              Unassigned Unassigned
              iamorinf Iago Amorín Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: