WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#23539 closed defect (bug) (fixed)

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

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

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 7 years ago.
23539.2.diff (396 bytes) - added by kovshenin 7 years ago.

Download all attachments as: .zip

Change History (13)

#1 @helen
8 years ago

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?

#2 @kwight
8 years ago

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.

#3 @WraithKenny
7 years ago

  • Cc Ken@… added

#4 @WraithKenny
7 years ago

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

@kovshenin
7 years ago

#5 @kovshenin
7 years ago

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.

#6 @SergeyBiryukov
7 years ago

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

#7 @markjaquith
7 years ago

  • 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.

@kovshenin
7 years ago

#8 @kovshenin
7 years ago

  • 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.

#9 @SergeyBiryukov
7 years ago

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

#10 @SergeyBiryukov
7 years ago

In 23866:

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

#11 @SergeyBiryukov
7 years ago

  • 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.