[MAGNOLIA-6985] Area's auto creation: Creation of multi-value properties is not possible over Yaml Created: 22/Mar/17 Updated: 29/Mar/22 Resolved: 25/Jan/22 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | templating |
| Affects Version/s: | 5.5.2, 6.2.11 |
| Fix Version/s: | 6.2.16 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Christian Ringele | Assignee: | Quach Hao Thien |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | maintenance, nucleus, to-verify | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 6d 7.5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| 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
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
||||||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||
| Sprint: | Nucleus 1, Nucleus 2 | ||||||||||||||||||||
| Story Points: | 3 | ||||||||||||||||||||
| Team: | |||||||||||||||||||||
| Description |
|
Various fields create mutli-value properties (TwinColum etc). Here we run into a bug: So the code expects that a sub-strucutre of node should be created -> HashMaps are used for defining sub-node strucutres. Here form here info.magnolia.rendering.generator.CopyGenerator.createNode(Node, Map<String, Object>):
// a sub content
if (property.getValue() instanceof HashMap) {
Map<String, Object> map = new HashMap<String, Object>();
map.put(propertyName, value);
createNode(newNode, map);
}
else {
PropertyUtil.setProperty(newNode, propertyName, value);
}
The code will go into "if" and not "else" as a HashMap is returned. Problem:
food:
- Sandwich
- Pizza
- Burrito
- Chocolate cake
Also this type of List: drinks: [coke, beer, water, milk] |