Generated slug is "auto-draft" when a new post is created #8770
Labels
[Feature] Saving
Related to saving functionality
[Package] Editor
/packages/editor
[Type] Bug
An existing feature does not function as intended
Describe the bug
The
generated_slug
attribute in thecore/editor
store is set toauto-draft
by default.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect
generated_slug
to be empty.Additional note on autosaving
When I look at the slug that is generated when the autosave is triggered before a draft is saved manually, I see that the url is:
http://example.com/?p=123
(you can view the url when hovering over the title). So either thegenerated_slug
should be?p=123
or an empty string, after an autosave.Why
auto-draft
(which is a post status) is in thegenerated_slug
field in the first place seems unintentional?Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Gutenberg version: 3.4
Currently we use the following logic to get the slug from the
core/editor
store:The text was updated successfully, but these errors were encountered: