Uploaded image for project: 'Magnolia Personalization'
  1. Magnolia Personalization
  2. MGNLPN-184

Switching to original of a page in page preview jumps back to variant

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 1.0.1
    • 1.0
    • Integration
    • FF, Safari, Chrome

      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.

        Acceptance criteria

              pmundt Philip Mundt
              weder Andreas Weder
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD