[MGNLPN-288] Preview for cookie trait does not work for corresponding Persona Created: 08/Jun/16  Updated: 27/Jul/16  Resolved: 27/Jul/16

Status: Closed
Project: Magnolia Personalization
Component/s: Preview App
Affects Version/s: 1.1.4
Fix Version/s: 1.1.6, 1.2.6, 1.3

Type: Bug Priority: Critical
Reporter: Frank Sommer Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File personas.cookie-basel.xml     XML File website.sportstation.about.xml     PNG File works-with-additional-trait.png    
Issue Links:
dependency
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:
Sprint: Kromeriz 54
Story Points: 5

 Description   

If you use the cookie trait for a persona, the preview does not work for that. Only a additional set trait works.

I can reproduce this on demo-author instance.

  1. create a persona with cookie trait for Basel (personas.cookie-basel.xml)
  2. create a variation for cookie trait Basel (website.sportstation.about.xml)
  3. open the p13n preview and choose the basel persona
  4. add a additional cookie trait for Basel


 Comments   
Comment by Frank Sommer [ 08/Jun/16 ]

Reason seems to be an inconsistency in the parameter converter classes like info.magnolia.personalization.cookie.CookieParameterConverter. The toString method is called from PreviewApp and converts the parameter to the correct format. But if the settings comes from the persona, the value will not converted and would not be understood.

E.g.:
Persona cookieName=cookieValue – (fromString) --> CookieTrait with cookieName=cookieValue --> null
Parameter cookieName=cookieValue – (toString) --> cookieName_cookieValue – (fromString) --> CookieTrait with cookieName --> cookieValue

Comment by Teresa Miyar [ 09/Jun/16 ]

5 + 2 + 5 + 5 + 5 + 0 = 22

Comment by Frank Sommer [ 09/Jun/16 ]

The same issue occures for the date trait. As parameter in the preview it works instead as property of a persona.

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