[MGNLUI-3860] MultiValueChilNodeTransformer does not work with a linkfield Created: 25/Apr/16 Updated: 17/Oct/16 Resolved: 30/May/16 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | dialogs |
| Affects Version/s: | 5.4.5, 5.4.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Teresa Miyar | Assignee: | Federico Grilli |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | support, timebox | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 1d | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||
| Date of First Response: | |||||||||||||
| Sprint: | Basel 46 | ||||||||||||
| Story Points: | 2 | ||||||||||||
| Description |
|
When using a info.magnolia.ui.form.field.definition.LinkFieldDefinition and a MultivalueChildNodetransformer, it works if the item is already created, but fails if you create a new item. This was tested on the security app creating a new user. Caused by: java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:400) at java.util.ArrayList.remove(ArrayList.java:477) at info.magnolia.ui.vaadin.integration.jcr.AbstractJcrNodeAdapter.sortChildren(AbstractJcrNodeAdapter.java:249) at info.magnolia.ui.vaadin.integration.jcr.AbstractJcrNodeAdapter.updateChildren(AbstractJcrNodeAdapter.java:215) at info.magnolia.security.app.dialog.action.SaveUserDialogAction.createOrUpdateUser(SaveUserDialogAction.java:183) at info.magnolia.security.app.dialog.action.SaveUserDialogAction.execute(SaveUserDialogAction.java:97) at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:62) ... 123 more OUTCOME However, the dev team is not keen on including the fix to SaveUserDialogAction.java in the code base as having a user sub-node with custom properties seems more like a customer-specific need for a given project and not something we want to support out of the box. So we would suggest the customer to create/extend a custom SaveUserDialogAction and apply the above patch. Case is different for the inability of User to support multivalued properties (again not a transformer problem |
| Comments |
| Comment by Teresa Miyar [ 25/Apr/16 ] |
|
Field configuration attached |