Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#7816 closed defect (bug) (fixed)

Clicking Preview before Save will result in Blank, New Post

Reported by: lloydbudd Owned by:
Milestone: 2.7 Priority: high
Severity: major Version: 2.7
Component: Autosave Keywords:
Focuses: Cc:


Clicking Preview before Save will result in Blank, New Post

ENV: WP trunk r9039 (2.7-hemorrhage)


  1. Go to Write Post
  2. Enter content in Title and Post
  3. Click Preview Post


A new window/tab is opened with a blank, Write Post page. Relative URL is wp-admin/post-new.php?preview=true




If you click Save Draft first, then it behaves as expected. URL is updated.

Aside, during autosave, it's a strange effect that Preview is the only button that stays available. I would just make it consistent and have them all disable and also display a message right below the buttons that "Autosaving..." (I can file a new ticket if preferred.)

Change History (5)

#1 @azaozz
10 years ago

I think we should standardize how the Preview works for all possible post statuses. Doing a manual autosave and then displaying that in the preview window seems like a logical solution.

To achieve that may need to put the "save" part of autosave in a separate function (so it's accessible without AJAX) and perhaps modify get_post() a bit so it can display the autosaved data.

#2 @ryan
10 years ago

  • Component changed from Administration to Autosave
  • Owner anonymous deleted

#4 @azaozz
10 years ago

[9473] should fix the previews. Also it always reuses the preview window, so (on a wide screen) the user can have the write page on one side of the screen and the preview on the other, clicking the Preview button on the write page will refresh the preview page with the latest changes.

#5 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.