Skip to content

Local search · English

    Preview behavior and diagnose script errors

    Design is for safe visual editing. Preview JS is where authored scripts can execute in the preview environment. The published page is the final check because its host, asset paths, security headers and content snapshot can differ from the editor.

    • Save or apply pending source edits. Use a sample interaction such as opening a menu, without production payment or email actions.
    1. Open Preview JS and repeat one interaction at a time. Record the expected result and the actual result. Check whether the relevant HTML element exists before investigating the JavaScript that selects it.

    2. Inspect the browser console and Network panel. A syntax error, missing file, CORS rejection and CSP violation require different fixes. Record the failing URL and status without copying credentials or private form values into reports.

    3. For relative assets, compare the configured Asset base URL with the intended published origin. Check script type, placement and load order. Save a changed site script separately from the page that uses it.

    4. Publish the reviewed page and dependencies, then repeat the interaction on its anonymous public URL. Refresh deliberately to distinguish a previous publication or cached immutable asset from the new version.

    • You can identify the exact failing resource or source location, and the same intended interaction succeeds on the public page.

    If Preview works but publication fails, compare public asset URLs, live file versions and headers first. Broadly disabling security headers can hide the symptom while exposing the site; fix the specific allowed source or broken path instead.

    Applies to Strukt c02552848c92 · 2026-10-31