enonic / app-contentstudio

Content Studio of Enonic XP
GNU General Public License v3.0
10 stars 4 forks source link

Incorrect behaviour when updating boolean properties in site config #683

Closed alansemenov closed 5 years ago

alansemenov commented 5 years ago
  1. In Features app change site.xml to have one input of type checkbox:
  <form>
    <input name="checkbox" type="Checkbox">
      <label>My checkbox</label>
      <occurrences minimum="1" maximum="1"/>
    </input>
  </form>
  1. Deploy the app. Site config in data looks like this:

image

  1. Open the site for edit, open the app config form and check off the checkbox.
  2. Apply changes. Don't close or refresh the Content Wizard.

Now data looks like this, so far so good:

image

  1. Open the app config form again and uncheck the checkbox.
  2. Apply the changes. Now instead of changing value of checkbox property from true to false, the entire config is deleted:

image

Again, don't close or refresh the Content Wizard.

  1. Open the app config form again and check off the checkbox.
  2. Apply the changes.

The value is no longer updated and the site is marked as invalid in the grid.

If you reload the Content Wizard before changing the value in site config, then the value is updated correctly.

alansemenov commented 5 years ago

Possible duplicate of https://github.com/enonic/xp/issues/7255. Close this, if the fix from https://github.com/enonic/xp/issues/7255 will be sufficient