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

Preview-as-visitor throws a JSON error on public instance

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.2.9, 1.3.2, 1.4.2
    • 1.2.8, 1.3.1, 1.4.1
    • Preview App
    • None
    • Kromeriz 80
    • 5

    Description

      The preview-as-visitor function throws a JSON error on public instances.

      To reproduce:

      1. Log into a public instance AdminCentral.
      2. Open the Preview as visitor app. --> JSON error

      elemental.json.impl.JreJsonNull cannot be cast to elemental.json.JsonString.
      RpcInvocationException: Unable to invoke method call in com.vaadin.ui.JavaScript$JavaScriptCallbackRpc
      caused by InvocationTargetException
      caused by ClassCastException: elemental.json.impl.JreJsonNull cannot be cast to elemental.json.JsonString

      Full stack trace attached: stacktrace.txt.

      The error is specific to public instances. It is not thrown on an author instance.

      The error was discovered by a client who wanted to verify that their variants were published/exported correctly. So there is a valid use case why previewing as visitor should work on public instances. It is not an author-instance-only task.

      The error is not related to travel demo content. I was able to reproduce it without demo modules too.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                efochr Evzen Fochr
                ahietala Antti Hietala
                Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 1d
                      1d