WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#14407 closed defect (bug)

Auto Drafts can overwrite one another — at Initial Version

Reported by: dd32 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description

Steps to reproduce:

  1. Open "New Post", Open "New Post" in a background tab (Time between actions: doesnt matter, Only the order of the below steps matters)
  2. Enter a Title/Content into the First window, and publish the post, Wait for the "Post Published!" confirmation
  3. Switch to the 2nd tab, Enter Title/Content into 2nd instance, and Publish the post, Wait for Confirmation
  4. Check the post listing, You'll only find the 2nd post.
  5. Check the revision for that post, You'll see the 2nd post overwrote the 1st post.

I'm able to reproduce it every time.. As long as 2 new post windows are opened at the same time (before either being published) publishing either form will overwrite one another.

2 solutions:

  • NEW autodraft created for EVERY instance of the post-new screen, rather than just re-using the last unused autodraft
  • Upon first save of a Autodraft:
    • Has Autodraft already been saved by another process? Give it a New ID, and update the form to recognise that

Change History (0)

Note: See TracTickets for help on using tickets.