Autosaved preview does not show featured images, categories, or tags
When create new post and assigned Featured image, Categories and tags, preview not show them until Save Draft first.
Tested and confirmed using the following testing steps:
- Start a new post and give it a title and some content.
- Select a category, add a tag, and add a featured image.
- Click the "Preview" button.
- Note that the category, tag, and featured image are not shown in the preview.
- Close the preview.
- Click the "Save Draft" button.
- Click the "Preview" button.
- 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)
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? 😊)
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
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.
@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. 😊
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.
I'm closing as invalid, if it's not please reopen ;)