[MGNLPN-663] Trait storage differs between Magnolia 5.7 and Magnolia 6.2 Created: 11/Jul/22 Updated: 23/Aug/22 Resolved: 23/Aug/22 |
|
| Status: | Closed |
| Project: | Magnolia Personalization |
| Component/s: | None |
| Affects Version/s: | 2.1.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Carlos Cantalapiedra | Assignee: | Lam Nguyen Bao |
| Resolution: | Done | Votes: | 2 |
| Labels: | cs-bk | ||
| Σ Remaining Estimate: | 0d | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 6.75d | Time Spent: | 6d 5.75h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Attachments: |
|
|||||||||||||||
| Issue Links: |
|
|||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||
| Template: |
|
|||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[X] 
Architecture Decision Record (ADR)
|
|||||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
|||||||||||||||
| Documentation update required: |
Yes
|
|||||||||||||||
| Date of First Response: | ||||||||||||||||
| Epic Link: | AuthorX Support | |||||||||||||||
| Sprint: | AuthX 15, AuthX 16 | |||||||||||||||
| Story Points: | 5 | |||||||||||||||
| Team: | ||||||||||||||||
| Description |
DescriptionA trait defined as a multivalue field which contains a composite composed by two textFields is stored at JCR in different ways on Magnolia 5.7 and Magnolia 6.2. Steps to reproduce
Expected resultsBy following the official Magnolia 6 UI ports of 5 UI field transformer classes, the data is stored same way on Magnolia 5 and on Magnolia 6 Actual resultsThe data is missing a contentNode which prevents the node2Bean transformer to work as supposed WorkaroundN/A Development notesIts very important to achieve the very same storage behavior as far as the contentNode which contains the voters (named "fields", "items" whatever) must match the property List<Bean> nodeName so the node2Bean maps into a List all the voters. |
| Comments |
| Comment by Michail Botas [ 26/Jul/22 ] |
|
Hello, Could you please inform us when do you plan to start fixing this bug? I am asking because this is quite important for us and we need to know your plan since your plan affects our planning.
Thanks, Michail |
| Comment by Laura Delnevo [ 28/Jul/22 ] |
|
Hi michail_botas, we have started looking into this bug as of this sprint. I can see already that you're watching this issue so you should be able to monitor our progress via Jira. Thank you, Laura |
| Comment by Lam Nguyen Bao [ 16/Aug/22 ] |
|
Hi ccantalapiedra michail_botas, After investigating, I can confirm that the behavior is working as expected. Technically ruleField be wrapped inside Multi-field (implicit). So for the definition we can have structure:
With this configuration, we will have similar data-structure in every apps. In order to have the result as same as 5.2, we can provide composite field between those multi fields and it should work fine (custom traits with complex fields) 'TESTINGMULTIFIELD': 'converterClass': 'info.magnolia.personalization.preview.parameter.DateParameterConverter' 'traitClass': 'java.util.Date' 'voterClass': 'info.magnolia.personalization.date.system.DateVoter' 'ruleField': '$type': 'compositeField' 'itemProvider': 'class': 'info.magnolia.ui.editor.CurrentItemProvider' 'properties': 'fields': '$type': 'jcrMultiField' 'label': 'Add this trait to see…’ 'entryResolution': 'class': 'info.magnolia.ui.editor.MultiFieldEntryResolution$Definition' 'propertyNameDecorator': 'info.magnolia.ui.field.AlwaysEmptyPrefixNameDecorator' 'itemProvider': '$type': 'jcrChildNodeProvider' 'supportI18N': false 'nodeName': 'fields' 'field': '$type': 'compositeField' 'properties': 'text': '$type': 'textField' 'label': 'text' 'name': 'text' 'type': 'java.lang.String' 'link': '$type': 'textField' 'label': 'link' 'name': 'link' 'valueField': 'extends': '../ruleField'
|
| Comment by Michail Botas [ 16/Aug/22 ] |
|
Hi @lam.nguyen, Indeed you are totally right!!! In the definition that I provided to Carlos I did not have the 1st composite field! So this was causing issues.
It is not so clear to understand this from documentation page with first reading. After your detailed comment it is purely clear what is required. I believe this ticket and SUPPORT-15118 can be closed.
Many many thanks for your help, Michail |
| Comment by Laura Delnevo [ 16/Aug/22 ] |
|
michail_botas thanks for the feedback, and good point about the documentation. I will take a look and we'll update it |