Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Preview Not Working with Template Vercel Website #11261

Open
sabinayakc opened this issue Feb 18, 2025 · 0 comments
Open

Live Preview Not Working with Template Vercel Website #11261

sabinayakc opened this issue Feb 18, 2025 · 0 comments
Labels
status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@sabinayakc
Copy link

Describe the Bug

I am getting the following error when trying to click on Live Preview from a page.

SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin '/next/preview?slug=home&collection=pages&path=%2Fhome&previewSecret=xxxxxxxxxxx' in a call to 'postMessage'.

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/tree/main/templates/with-vercel-website

Reproduction Steps

  • Deploy Template to Vercel
  • Clone Locally and Run
  • Seed Payload
  • Go to a Page and click on Live Preview

Which area(s) are affected? (Select all that apply)

Not sure

Environment Info

Binaries:
  Node: 20.16.0
  npm: 10.8.1
  Yarn: N/A
  pnpm: 9.15.3
Relevant Packages:
  payload: 3.22.0
  next: 15.1.6
  @payloadcms/email-nodemailer: 3.23.0
  @payloadcms/graphql: 3.22.0
  @payloadcms/live-preview: 3.23.0
  @payloadcms/live-preview-react: 3.23.0
  @payloadcms/next/utilities: 3.22.0
  @payloadcms/payload-cloud: 3.22.0
  @payloadcms/plugin-cloud-storage: 3.22.0
  @payloadcms/plugin-form-builder: 3.22.0
  @payloadcms/plugin-nested-docs: 3.22.0
  @payloadcms/plugin-redirects: 3.22.0
  @payloadcms/plugin-search: 3.22.0
  @payloadcms/plugin-seo: 3.22.0
  @payloadcms/richtext-lexical: 3.22.0
  @payloadcms/storage-vercel-blob: 3.22.0
  @payloadcms/translations: 3.22.0
  @payloadcms/ui/shared: 3.22.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 10
@sabinayakc sabinayakc added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant