Skip to content

Post Revisions: "Restore" button is enabled on the current revision and firing it shows a fake "Version restored" success message #81401

Description

@jordesign

Description

On the Post Revisions view, the current version of a post still shows an active "Restore" button — even though there's nothing to restore to (the post is already at that state).

Image

Clicking it fires a "Version restored…" success notice as if a restore had happened, despite no state change occurring.

Image

The button should either be disabled/hidden on the current revision, or clicking it should be a no-op that doesn't display a misleading success message.

Steps to reproduce

  1. Open the Post Revisions view for a post that has at least one prior revision.
  2. Look at the current revision (the most recent, i.e. the one already applied to the post).
  3. Observe the "Restore" button is enabled.
  4. Click it.

Expected

Either:

  • "Restore" is disabled / hidden on the current revision (nothing to restore), or
  • Clicking it is a no-op that doesn't produce a success message.

Actual

  • "Restore" is enabled on the current revision.
  • Clicking it fires a "Version restored…" success message even though no state has changed.

Reporter's own words

For post revisions, I found it strange that the current version still had a "Restore" button because there is nothing to restore, it's at the current version. When you click Restore, it acts as though it has restored a version, and the popup message says "Version restored…"

I expected the Restore button to be disabled or something since there is nothing to restore.

Environment

  • WordPress 7.1-beta4

Metadata

Metadata

Assignees

Labels

[Feature] HistoryHistory, undo, redo, revisions, autosave.[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions