[MGNLPN-184] Switching to original of a page in page preview jumps back to variant Created: 19/Aug/14  Updated: 01/Sep/14  Resolved: 26/Aug/14

Status: Closed
Project: Magnolia Personalization
Component/s: Integration
Affects Version/s: 1.0
Fix Version/s: 1.0.1

Type: Bug Priority: Blocker
Reporter: Andreas Weder Assignee: Philip Mundt
Resolution: Fixed Votes: 0
Labels: next
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FF, Safari, Chrome


Attachments: PNG File 1 Setting - page w one variant.png     PNG File 2 preview show variant.png     PNG File 3 I pick the variant.png     PNG File 4 original briefly shows.png     PNG File 5 switched back to variant.png    
Issue Links:
Relates
relates to MGNLPN-131 VariantResolver should not be trigger... Closed
relates to MGNLPN-139 VariantResolver should not be trigger... Closed
dependency
depends upon MAGNOLIA-5894 Add boolean voter that votes on a par... Closed
depends upon MAGNOLIA-5898 Create boolean voter that votes whene... 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:

 Description   

Behavior on demoauthor.magnolia-cms.com

As shown in the first screenshot, there's a page with one variant. An audience for that variant has been chosen and named "EMEA".

When I attempt to preview the original of that page in the page editor (not the Preview app), the page preview keeps jumping back to the variant. The combobox for choosing the variant to show first screenshot briefly stays on "Original", then jumps to the variant.

I've tried the following:

  • if I don't choose an audience, switching between original and variant works fine
  • this seems to be independant of the trait or segment I pick when choosing the audience.
  • many browsers seem to be affected (not tested with IE)

This was reported to me by Boris, who used our online demo to create the example shown in order to prepare a demo.

How to reproduce on localhost

Instead of using the segment "EMEA" simply "attach" a date trait with the date set the "today".

Reasoning

The info.magnolia.personalization.variant.RegistryVariantResolver used in the info.magnolia.personalization.filter.VariantResolverFilter will detect "the right" variant.

The example above on demoauthor.magnolia-cms.com works because the client IP address is actually an EMEA address (Swiss).

Suggested solution

https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options (this can't be used as this header is not set)

We should use the GET parameter mgnlVariant to identify a needed bypass of the filter as this parameter is not used in the PreviewApp.


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