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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.8, 1.3.1, 1.4.1
    • Fix Version/s: 1.2.9, 1.3.2, 1.4.2
    • Component/s: Preview App
    • Labels:
      None
    • Sprint:
      Kromeriz 80
    • Story Points:
      5
    • Magnolia Release:
      5.4.11, 5.5.2

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  Time Tracking

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