[MAGNOLIA-7916] Prototype template values are not correctly merged Created: 30/Oct/20  Updated: 06/Apr/23  Resolved: 27/Mar/23

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.2.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jonathan Ayala Assignee: Canh Nguyen
Resolution: Cannot Reproduce Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: 1.25d
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2020-10-30 at 16.27.08.png     File config.modules.multisite.config.sites.test.yaml     PNG File screenshot-1.png     Zip Archive test-prototype-lm.zip    
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:
Epic Link: Support
Sprint: DevX 34
Story Points: 5
Team: DeveloperX
Work Started:
Approved:
Yes

 Description   

When having a template prototype whose configuration values are override in another page definition, these are not correctly merged from the prototype to the template and as a consequence, prototype values must be set again in the page definition.

Test scenario:
We have the following prototype definition in which test-area and subarea set their templateScript properties as well as disable them by default:

In certain page template we want to enable them so that we define enabled property to true:

test-area:
    enabled: true
    areas:
      subarea:
        enabled: true

Expected result:
Both areas are enabled and the corresponding templateScript is rendered
Actual result:
templateScript is not populated from the prototype to the page template while merging and resulting rendition is not the expected one.
Dev Notes:
Adding the templateScript property to the page template again is necessary to get the expected result.

test-area:
    enabled: true
    templateScript: /mtk/templates/pages/test-area.ftl
    areas:
      subarea:
        enabled: true
        templateScript: /mtk/templates/pages/subarea.ftl

This has been tested in 5.7.8 successfully, values are populated and corresponding scripts rendered.



 Comments   
Comment by Canh Nguyen [ 23/Mar/23 ]

Hi jayala 

I've tried to reproduce the issue but I couldn't reproduce it.

Please check test-prototype-lm.zip and config.modules.multisite.config.sites.test.yaml.

This is the result from the attached light module and the site config:

Comment by Oanh Thai Hoang [ 27/Mar/23 ]

Hi jayala . I double checked and try to reproduce again but I see prototype merge correctly. I close ticket as can not reproduce now, feel free to contact us if you need more info. Thank you

Generated at Mon Feb 12 04:27:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.