Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autosaved preview does not show featured images, categories, or tags #7767

Closed
Emilybkk opened this issue Jul 7, 2018 · 6 comments
Closed
Labels
[Feature] Saving Related to saving functionality [Status] Not Applicable Issue outside Gutenberg, is not a bug, or is a support request.
Milestone

Comments

@Emilybkk
Copy link

Emilybkk commented Jul 7, 2018

When create new post and assigned Featured image, Categories and tags, preview not show them until Save Draft first.

@Emilybkk Emilybkk changed the title Preview before Save Draft not show Featured image and Tag. Preview before Save Draft not show Featured image, Categories and Tag. Jul 7, 2018
@designsimply designsimply added [Type] Question Questions about the design or development of the editor. [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Jul 18, 2018
@designsimply
Copy link
Member

Tested and confirmed using the following testing steps:

  1. Start a new post and give it a title and some content.
  2. Select a category, add a tag, and add a featured image.
  3. Click the "Preview" button.
  4. Note that the category, tag, and featured image are not shown in the preview.
  5. Close the preview.
  6. Click the "Save Draft" button.
  7. Click the "Preview" button.
  8. Note that you can now see the category, tag, and featured image in the preview.

Result: category, tag, and featured images are not shown for draft previews unless the "Save Draft" button is explicitly. (45s)

preview-before-save-draft
Seen at http://alittletestblog.com/wp-admin/post.php?post=14016&action=edit running WordPress 4.9.7 and Gutenberg 3.2.0 using Firefox 61.0.1 on macOS 10.13.6.

What is the intended behavior? (@youknowriad may I ask you? 😊)

@youknowriad
Copy link
Contributor

Can I ask if it's a similar behavior in the classic editor?

IMO, this comes from the fact that the autosave endpoint only saves title, content and excerpt and when previewing posts, this endpoint is triggered which doesn't perform a full save (and also doesn't create revisions).

I think this is intended but better confirm with @aduth @adamsilverstein

@mtias mtias added [Feature] Saving Related to saving functionality and removed [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Jul 19, 2018
@adamsilverstein
Copy link
Member

Can I ask if it's a similar behavior in the classic editor?

Currently in the classic editor previews do include all of the meta stored data, however a longstanding core bug means that any changed meta is actually saved to the live post when you perform the preview action (https://core.trac.wordpress.org/ticket/20299) although i think we fixed this for featured images recently.

@designsimply
Copy link
Member

@youknowriad, fwiw, it makes sense to me that previewing featured images should always work because that potentially changes the view on the front end dramatically. I don't feel strongly about categories or tags but they sound like nice-to-haves. 😊

@designsimply designsimply added [Type] Bug An existing feature does not function as intended and removed [Type] Question Questions about the design or development of the editor. labels Aug 15, 2018
@designsimply designsimply added this to the 3.6 milestone Aug 15, 2018
@youknowriad
Copy link
Contributor

So I think we should close this as invalid because the fact that classic editor saves those meta is considered a bug per @adamsilverstein's comment and not sure revisions/autosave allows saving more values than the content/title/excerpt.

Please correct me if I'm wrong.

@youknowriad
Copy link
Contributor

I'm closing as invalid, if it's not please reopen ;)

@youknowriad youknowriad added [Status] Not Applicable Issue outside Gutenberg, is not a bug, or is a support request. and removed [Type] Bug An existing feature does not function as intended labels Aug 16, 2018
@designsimply designsimply changed the title Preview before Save Draft not show Featured image, Categories and Tag. Autosaved preview does not show featured images, categories, or tags Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Saving Related to saving functionality [Status] Not Applicable Issue outside Gutenberg, is not a bug, or is a support request.
Projects
None yet
Development

No branches or pull requests

5 participants