Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-11996

Adding config for new validator also auto-exports "required/Html" validator config

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 13.3.0
    • 13.3.0
    • None
    • None

    Description

      When a new validator is configured, auto-export also exports the configuration of the "required/Html" validator. Which is weird, since that validator is bootstrapped by the system itself and should not be auto-exported.

      As a result, the repository does not start again when bootstrapped cleanly.

      Steps to reproduce:

      1: Create a 13.3.0-SNAPSHOT archetype:

      mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeRepository=https://maven.onehippo.com/maven2 -DarchetypeGroupId=org.onehippo.cms7 -DarchetypeArtifactId=hippo-project-archetype -DarchetypeVersion=13.3.0-SNAPSHOT

      2: Build and start

      cd myproject
      mvn clean verify
      mvn -Pcargo.run -Drepo.path=storage 

      3: Login to the Console and add a new validator. For example reuse the 'escaped' validator class but call it 'bla':

      /hippo:configuration/hippo:modules/validation/hippo:moduleconfig/bla:
        jcr:primaryType: hipposys:moduleconfig
        hipposys:className: org.onehippo.cms.services.validation.validator.EscapedHtmlValidator

      4: Stop the CMS.

      5: Check that auto-export created the file hcm-config/configuration/modules/validation.yaml

      Expected: validation.yaml only contains the new 'bla' validator
      Actual: validation.yaml also contains the 'required/Html' validator

      The worst part:
      6: Rebuild the project

      mvn clean verify 

      7: Restart with a clean repository

      rm -rf storage
      mvn -Pcargo.run -Drepo.path=storage 

      8: Notice how the CMS fails to start

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mdenburger Mathijs den Burger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: