Skip to content

fix: auto-save alert link to the correct revision screen#77490

Open
Swanand01 wants to merge 1 commit into
WordPress:trunkfrom
Swanand01:fix/auto-save-alert-link-to-old-revisions-screen
Open

fix: auto-save alert link to the correct revision screen#77490
Swanand01 wants to merge 1 commit into
WordPress:trunkfrom
Swanand01:fix/auto-save-alert-link-to-old-revisions-screen

Conversation

@Swanand01

Copy link
Copy Markdown
Contributor

What?

Closes #75868

Why?

When a user returns to a post and the editor discovers that there is a more recent auto-save version than the version the user is on, the block editor displayes a warning on top of the screen with the link
"View the autosave". The URL points to the old screens at /wp-admin/revision.php?revision=xxxx

How?

setCurrentRevisionId() is used instead of using the url from settings.autosave.editLink

Testing Instructions

  1. Open a post in browser window.
  2. Make changes to the post.
  3. Don't save.
  4. Open a different browser
  5. open the same post in the block editor.
  6. That should display the autosave warning.

Use of AI Tools

Claude code

@github-actions github-actions Bot added the [Package] Editor /packages/editor label Apr 20, 2026
@t-hamano t-hamano added the [Feature] History History, undo, redo, revisions, autosave. label Apr 20, 2026
@github-actions

Copy link
Copy Markdown

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: [Package] Editor, [Feature] History.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@Swanand01 Swanand01 marked this pull request as ready for review April 21, 2026 08:31
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Swanand01 <swanandm@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: bph <bph@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] History History, undo, redo, revisions, autosave. [Package] Editor /packages/editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-save alert links to old revision screen

2 participants