[MGNLDIFF-100] Compare current with previous version is not aware of personalization Created: 09/Oct/17  Updated: 25/Oct/18  Resolved: 25/Oct/18

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

Type: Bug Priority: Neutral
Reporter: Maxime Michel Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File compare-to-previous-added-diff.png     PNG File compare-to-previous-removed-diff.png     PNG File compare-to-previous-simple-page.png     PNG File diff.png     PNG File from1.1-to-1.2-almost-correct.png    
Issue Links:
causality
is causing MGNLDEMO-266 Broken diff in demo with personalized... Closed
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:
Story Points: 5

 Description   

When doing "Compare with previous version" on the travel demo home page, a broken diff is produced.

Here are the steps to reproduce:

1. go to Pages
2. publish travel
3. edit the page
4. add a component to the main area
5. go back to Pages
6. click 'Compare to previous version'
7. the diff is completely broken


After some investigation the issue seems to be caused by the "Featured Tour Types" personalised component which is hidden by default.
When versioning a page with such a component the versioned page is saved with the "hidden" component which is eventually displayed, whereas the current page hides it. So the diff module basically compares two different sources and correctly displays the removed images and contents for the hidden component.
However, if one chooses the component variant "Tour type is known" and then compare the current with the previous page, the output looks correct.

In conclusion, the diff here is a result of personalisation variants (based on a cookie in this particular case) and we need to find a way to make the action aware of all personalisation variants for the page (and the components therein) being compared in order to produce the correct diff output.



 Comments   
Comment by Antti Hietala [ 22/Jan/18 ]

The broken diff view can be resolved by changing how component variants are composed on travel home. Delete the Featured Tours by Tour Type component and make it a variant of Tour Type Teaser Row.

  1. Delete component 01 in the main area.
  2. In component 00, change variant-1's template to Featured Tours (by TourType) and set variant audience to Cookie: Tour type = any value.

However, the workaround does not prevent a customer from potentially composing the same problematic component scenario on their own. A permanent fix requires changing how we render diffs.

You cannot change the variant's template to Featured Tours (by TourType). NoSuchDefinitionException error is thrown, which could be a template availability issue. However, you can reproduce the workaround with another component template.

Generated at Mon Feb 12 05:21:22 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.