Opened 3 months ago

Closed 8 weeks ago

#23539 closed defect (bug) (fixed)

Post Formats UI: new post format meta data not added to preview

Reported by: kwight Owned by: markjaquith
Priority: normal Milestone: 3.6
Component: Editor Version:
Severity: normal Keywords: has-patch
Cc: Ken@…

Description

If post format meta data is changed and the user tries to preview with the Preview Changes button, they will get only the last saved meta data instead.

A related question: should Preview Changes display the last active post format tab, regardless of changes, or the last post format to receive updated meta data?

Related issue: when using the browser Back button to get back to the Edit view, those changes will have been lost (unlike previewing a content change).

Attachments (2)

23539.diff (1.9 KB) - added by kovshenin 8 weeks ago.
23539.2.diff (396 bytes) - added by kovshenin 8 weeks ago.

Download all attachments as: .zip

Change History (13)

Related / essentially blocked by #20299 and #20564.

Not sure what you mean by using the back button to go to edit view - doesn't preview open in a new tab/window?

I thought that was weird too; may have been a temporary browser issue (Chrome/Mac). This morning, however, Preview seems to work now as expected in r23460.

  • Cc Ken@… added

I've added working patches to those blocking tickets if you'd like to check it out.

After [23859] post formats meta data is saved to the actual revisions, but previews fetch the data from the post. 23539.diff intercepts the get_post_meta calls during previews and makes sure revisioned keys are fetched from revisions/autosaves. It also makes sure revisioned metadata is saved during autosaves.

Would it make sense to use get_post() instead of the global, for consistency with [21735]?

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from new to closed

In 23862:

Use the revisioned post format metadata when previewing.

fixes #23539. props kovshenin.

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.6
  • Resolution fixed deleted
  • Status changed from closed to reopened

.2 makes sure there is an autosave post before proceeding.

While we're at it, let's also move _show_post_preview() back next to _set_preview(), where it was before [23823].

In 23866:

Move _show_post_preview() back next to _set_preview(). see #23539.

  • Resolution set to fixed
  • Status changed from reopened to closed

In 23867:

Make sure the autosave post exists before getting its meta. props kovshenin. fixes #23539.

Note: See TracTickets for help on using tickets.