Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option Set - Incorrect radio button behavior in multi selection #1878

Closed
ashklianko opened this issue Apr 1, 2021 · 1 comment
Closed

Option Set - Incorrect radio button behavior in multi selection #1878

ashklianko opened this issue Apr 1, 2021 · 1 comment
Assignees
Labels
Bug Something isn't working

Comments

@ashklianko
Copy link
Member

@sgauruseu commented on Tue Mar 30 2021

Case 1

  1. Select Features and open new wizard for Option Set
  2. Unselect the Option 2 radio
  3. Click on Save button

image

BUG - Option 2 radio gets selected again after the saving.

  1. Click on Option 2 again -
    BUG - Option 2 remains selected and subheader is not correct now, option 2 is duplicated

image

Case 2
This case is reproducing when Option 2 contains occurrences of htmlArea inputs, for example

  <option name="option_2">
          <label>Option 2</label>
          <default>true</default>
          <items>
            <input name="htmlarea_2_4" type="HtmlArea">
              <label>HTML content 2:4</label>
              <occurrences minimum="2" maximum="4"/>
            </input>
          </items>
        </option>

Unselect the Option 2 and save the content

BUG- 500 error appears after saving the content

image

5:05:34.323 ERROR c.e.x.j.i.e.JsonExceptionMapper - NullPointerException
java.lang.NullPointerException: null
        at com.enonic.xp.core.impl.content.validate.OccurrenceValidator.validateInputOccurrences(OccurrenceValidator.java:160)
        at com.enonic.xp.core.impl.content.validate.OccurrenceValidator.validateInput(OccurrenceValidator.java:76)
        at com.enonic.xp.core.impl.content.validate.OccurrenceValidator.validate(OccurrenceValidator.java:57)
        at com.enonic.xp.core.impl.content.validate.OccurrenceValidator.validateFormOptionSetSelection(OccurrenceValidator.java:114)
        at com.enonic.xp.core.impl.content.validate.OccurrenceValidator.validateFormOptionSet(OccurrenceValidator.java:8
@alansemenov
Copy link
Member

Made a separate issue for the 2nd case: enonic/xp#8726

ashklianko added a commit that referenced this issue Apr 5, 2021
-Issue was in updating items for option set views: we clear totally data/properties for non-selected options on save and it's children items were not updated correctly since no props were provided
-Refactored create/update logic to remove redundant code
ashklianko added a commit that referenced this issue Apr 6, 2021
alansemenov pushed a commit that referenced this issue Apr 6, 2021
-Issue was in updating items for option set views: we clear totally data/properties for non-selected options on save and it's children items were not updated correctly since no props were provided
-Refactored create/update logic to remove redundant code
alansemenov pushed a commit that referenced this issue Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants