WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 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:

Description

Clicking Preview before Save will result in Blank, New Post

ENV: WP trunk r9039 (2.7-hemorrhage)

STEPS

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

ACTION RESULTS

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

EXPECTED RESULTS

Obvious

ADDITIONAL DETAILS

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)

comment:1 azaozz6 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.

comment:2 ryan5 years ago

  • Component changed from Administration to Autosave
  • Owner anonymous deleted

comment:4 azaozz5 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.

comment:5 ryan5 years ago

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