Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Editor: BrowserURL should be resilient to post save failure #7123

Closed
aduth opened this issue Jun 4, 2018 · 5 comments
Closed

Post Editor: BrowserURL should be resilient to post save failure #7123

aduth opened this issue Jun 4, 2018 · 5 comments
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Enhancement A suggestion for improvement.

Comments

@aduth
Copy link
Member

aduth commented Jun 4, 2018

Related: #7122 (specifically #7122 (comment) )

Currently, if a save request fails for a post where the request explicitly updates the post status, the BrowserURL component introduced in #7122 will not revert the URL back to post-new.php if the post was an auto-draft at the time of initiating the save.

Steps to reproduce:

  1. Navigate to Posts > Add New
  2. Go offline (e.g. Chrome "Offline" preset in Developer Tools)
  3. Enter a title
  4. Publish the post

Expected result:

The post is optimistically assumed to update, thus it's reasonable for the URL to change, but once the save fails, it should revert back to the URL which had existed prior to the save being initiated (i.e. post-new.php).

Actual result:

The URL lingers in its optimistic state.

Fortunately, from what has been tested, it is perfectly okay for post-new.php to be treated as equivalent to post.php?id=XYZ&action=edit where XYZ is the post ID for an auto-draft post, so no breakage occurs.

@aduth aduth added [Type] Enhancement A suggestion for improvement. General Interface Parts of the UI which don't fall neatly under other labels. labels Jun 4, 2018
@aduth
Copy link
Member Author

aduth commented Jun 4, 2018

Fortunately, from what has been tested, it is perfectly okay for post-new.php to be treated as equivalent to post.php?id=XYZ&action=edit where XYZ is the post ID for an auto-draft post, so no breakage occurs.

@danielbachhuber Based on your comment from Slack today, might I expect you'd propose we consider treating this as the default behavior anyways?

@danielbachhuber
Copy link
Member

might I expect you'd propose we consider treating this as the default behavior anyways?

Yes, I think this is a reasonable assumption, respecting any future discoveries otherwise.

@danielbachhuber
Copy link
Member

Related #3702 (comment)

@tofumatt
Copy link
Member

Sounds like #6322 is related too.

@nerrad
Copy link
Contributor

nerrad commented Apr 15, 2019

Triage review agrees that this seems to be expected behaviour. See discussion context on Slack (requires signup)

@nerrad nerrad closed this as completed Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants