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



    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0.1
    • Component/s: Integration
    • Labels:
    • Environment:
      FF, Safari, Chrome
    • Magnolia Release:


      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".


      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.


        1. 1 Setting - page w one variant.png
          266 kB
          Andreas Weder
        2. 2 preview show variant.png
          556 kB
          Andreas Weder
        3. 3 I pick the variant.png
          574 kB
          Andreas Weder
        4. 4 original briefly shows.png
          742 kB
          Andreas Weder
        5. 5 switched back to variant.png
          573 kB
          Andreas Weder

          Issue Links



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


                Date of First Response: