Skip to content

"Unpublish" effectively does nothing #12342

@jmcapra

Description

@jmcapra

Describe the Bug.

The admin panel's "unpublish" feature does not work as expected, as described in the reprod steps.

Recommended solution: replace "unpublish" with "Revert to...." which allows you to select any previous published version to revert to, or "Unpublish" the entire doc.

Related issue: #11942

Image

Reproduction Steps

  1. On a collection with autosave and draft enabled, create a new document and publish.
  2. You should have v1 - initial doc, v2 - autosave, v3 - current published version.
  3. Make some changes - v4 is created with status "autosave, draft".
  4. Publish v4, creating v5 with status "published".
  5. Click "unpublish" on the newly created v5.
  6. The document leaves v5 as "published" and creates a v6 with status "draft"....

So, your newly added changes are left intact, (not "unpublished"), and there is no way to fully "unpublish" a document/post unless you delete it or manually set status: draft on each version of the document.

Environment Info

Binaries:
  Node: 22.12.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 9.15.0
Relevant Packages:
  payload: 3.35.1
  next: 15.3.0
  @payloadcms/db-mongodb: 3.35.1
  @payloadcms/email-nodemailer: 3.35.1
  @payloadcms/graphql: 3.35.1
  @payloadcms/live-preview: 3.35.1
  @payloadcms/live-preview-react: 3.35.1
  @payloadcms/next/utilities: 3.35.1
  @payloadcms/payload-cloud: 3.35.1
  @payloadcms/plugin-cloud-storage: 3.35.1
  @payloadcms/plugin-form-builder: 3.35.1
  @payloadcms/plugin-nested-docs: 3.35.1
  @payloadcms/plugin-redirects: 3.35.1
  @payloadcms/plugin-search: 3.35.1
  @payloadcms/plugin-seo: 3.35.1
  @payloadcms/richtext-lexical: 3.35.1
  @payloadcms/storage-uploadthing: 3.35.1
  @payloadcms/translations: 3.35.1
  @payloadcms/ui/shared: 3.35.1
  react: 19.1.0
  react-dom: 19.1.0

Metadata

Metadata

Assignees

Labels

area: uiRelated to the admin panel.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions