The preview-as-visitor function throws a JSON error on public instances.
- Log into a public instance AdminCentral.
- Open the Preview as visitor app. --> JSON error
elemental.json.impl.JreJsonNull cannot be cast to elemental.json.JsonString.
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.