Skip to content

Live preview url is not recomputed on data changes #12785

Closed

Description

@jsardev

Describe the Bug

Often times – even in the official live preview example – a collection has its own slug field which ends up being the path to the page it refers to (example: /pages/:slug, /blog/:slug).

The slug is something important for SEO, so it's editable in most cases.

Now, the problem is that Live Preview does not work in this situation, as admin.livePreview.url is not recomputed when editing an entry, resulting in 404 pages.

Link to the code that reproduces this issue

https://github.com/jsardev/payload-live-preview-issue

Reproduction Steps

  1. Clone the repo, install dependencies, run pnpm dev
  2. Go to a Pages entry edit page
  3. Turn on Live Preview
  4. Change the slug
  5. The page will end up empty, as the Live Preview url depends on slug field, and the url is not recomputed on change

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

area: core

Environment Info

Binaries:
  Node: 22.16.0
  npm: 10.9.2
  Yarn: 1.22.22
  pnpm: 10.11.0
Relevant Packages:
  payload: 3.42.0
  next: 15.3.3
  @payloadcms/graphql: 3.42.0
  @payloadcms/live-preview: 3.42.0
  @payloadcms/live-preview-react: 3.42.0
  @payloadcms/next/utilities: 3.42.0
  @payloadcms/richtext-slate: 3.42.0
  @payloadcms/translations: 3.42.0
  @payloadcms/ui/shared: 3.42.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10

Activity

  1. added
    status: needs-triage
    validate-reproduction
    on Jun 12, 2025
  2. removed
    validate-reproduction
    on Jun 12, 2025
  3. LasseRosenow commented on Aug 7, 2025

    @LasseRosenow

    I am also facing this issue

  4. self-assigned this
    on Aug 29, 2025
  5. removed
    status: needs-triage
    on Aug 29, 2025
  6. added a commit that references this issue on Sep 23, 2025
    00a673e
  7. github-actions commented on Sep 25, 2025

    @github-actions
    Contributor

    🚀 This is included in version v3.57.0

  8. github-actions commented on Oct 3, 2025

    @github-actions
    Contributor

    This issue has been automatically locked.
    Please open a new issue if this issue persists with any additional detail.

  9. locked as resolved and limited conversation to collaborators on Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions