"Return to editor" link is wrong when comparing revisions
Edit by @aduth (2017-09-27): The original issue reported here has since been resolved, but behavior of "Return to editor" is still not always correct. See https://github.com/WordPress/gutenberg/issues/2808#issuecomment-332617564 for more details.
Issue Overview
"Return to editor" link (and post title link) is wrong when coming from Gutenberg editor.
Steps to Reproduce (for bugs)
- Save a post (can be draft or published), and then make edits and update, so WordPress has at least two revisions.
- Click the Revisions link in the Document inspector:

- Now click the "Return to editor" link:

Expected Behavior
I'd expect to go back to the Gutenberg editor.
Current Behavior
I end up in the normal editor:

Possible Solution
Add a querystring argument to the "X revisions" link in Document inspector, and use that to conditionally filter the URL for the return to editor link (get_editor_post_link filter).
https://github.com/WordPress/WordPress/blob/dd6da701b286579819cd6aa518aa2d7018efd759/wp-admin/revision.php#L75-L78
Are you running from the plugin version? I expect this is fixed by the get_edit_post_link filter introduced in #1797 , which will be included in the next plugin release. Testing myself, this seems to work correctly.
Closing, but please reopen if the issue is not resolved.
Are you running from the plugin version?
Sorry - yes, I was (1.1.0).
I'll wait until 1.2.0 and give that a go.
@GaryJones 1.2.0 was released today, if you want to try giving it another go.
Testing with 1.2.1, and generally it works, though there is an edge case that it doesn't.
The commit in #1797 has this line which checks that the post has at least one block.
The edge case can therefore be triggered by:
- Select Gutenberg -> New Post.
- Add a title only.
- Save, and reload the page to see the Revisions link in the Document inspector.
- Click Revisions link, then the Return to editor link.
You'll end up back in the old editor.
Closing, but please reopen if the issue is not resolved.
I also apparently don't have the ability to re-open.
Thanks for the detail @GaryJones . I've edited the original message with a pointer to the new steps, and will reopen.
This is still happening in 1.5.2
It seems like this still hasen't been fixed yet. I am using WordPress 4.9.1 with Gutenberg 1.8.1. I am not able to restore a revision, it already produces an empty post.
See here: https://de.wordpress.org/support/topic/gutenberg-revisionen-wiederherstellen-fuehren-zu-leerem-beitrag-wie-loesen/
Any ideas on how to bring the content back? Hotfix would be a thing.