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

Boolean component properties cannot be edited in the template composer

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.22.01, 2.23.01-alpha
    • 2.22.02, 2.23.02-alpha
    • channel-manager
    • None

    Description

      Boolean parameters in an HST component do not work well in the template composer. The UI renders checkbox, but the checkbox is never checked initially (even if the stored value is 'true'). Furthermore, after checking the checkbox the saved value is 'on' instead of 'true', and the checkbox is still unchecked. This makes it impossible to set a boolean value back to 'false'. And although the stored value 'on' does result in a return value of 'true' in the ParametersInfo interface, it's cleaner to store 'true' instead of 'on'.

      Steps to reproduce:
      1. in GoGreen, add to the BannerParamsInfo class an extra getter:

      @Parameter(name = "test", required = true, displayName = "Test")
      boolean getTest();

      2. recompile and start GoGreen
      3. navigate to the English Website channel
      4. click 'Edit Template'
      5. click the Banner component on the home page; an unchecked checkbox should be shown for the parameter 'Test'
      6. check the checkbox
      7. click 'Save'

      Expected: the checkbox stays checked, and one of the hst:parametervalue values in /hst:hst/hst:configurations/hippogogreen-preview/hst:pages/homepage/main/home-boxes-intro/banner contains the value 'true'.

      Actual: the checkbox is unchecked again after 'Save', and one of the hst:parametervalue values in /hst:hst/hst:configurations/hippogogreen-preview/hst:pages/homepage/main/home-boxes-intro/banner contains the value 'on'

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            mdenburger Mathijs den Burger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: