[MGNLPN-453] Pages with component variants don't create proper page variants Created: 12/Nov/19  Updated: 02/Mar/20  Resolved: 14/Jan/20

Status: Closed
Project: Magnolia Personalization
Component/s: Component p13n
Affects Version/s: 1.8
Fix Version/s: 1.6.3, 1.8.1, 2.0

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Roman Kovařík
Resolution: Fixed Votes: 2
Labels: 61, quickwin
Remaining Estimate: 1h
Time Spent: 6h 34m
Original Estimate: Not Specified

Attachments: File website.travel.main.0.yaml     File website.travel.variants.variant-0.main.0.yaml    
Issue Links:
Relates
relates to MGNLPN-455 Bad variant reference when nested var... Closed
relation
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: UI Framework 14
Story Points: 3

 Description   

To reproduce this issue:

  1. Turn on allowNestedVariants
  2. Using the travel demo home page create a page variant.
  3. Open the page for editing and observe you can no longer edit the component variant with the page variant.

This issue is cause by a missing mixin:

'jcr:mixinTypes': ['mgnl:hasVariant']

When the page is copied to create the page variant for some reason the mixin on the component variant is missing.



 Comments   
Comment by Richard Gange [ 12/Nov/19 ]

If you diff the original component variant with the new one you can easily see the issue.

diff website.travel.main.0.yaml website.travel.variants.variant-0.main.0.yaml 
Comment by Richard Gange [ 13/Nov/19 ]

Workaround:

You can workaround this issue with a Groovy script. Here I target the node with the missing mixin:

session = MgnlContext.getJCRSession("website")
node = session.getNode("/travel/variants/variant-0/main/0")

node.addMixin("mgnl:hasVariant")

session.save()
Comment by Rajeev Singh [ 23/Jan/20 ]

Hello Richard,

Do we already know the release date for 5.7.6 version? 

Thanks,

Rajeev

Comment by Roman Kovařík [ 23/Jan/20 ]

Hi rajeevsingh,

5.7.6 should be released in this sprint (end of January)

Regards,
Roman

Comment by Rajeev Singh [ 23/Jan/20 ]

Thanks Roman, 

Generated at Mon Feb 12 06:37:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.