You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Slug is returning empty string response when post is in draft status #2712
I am creating posts with title only. Then, I edit them and pass the ?context=edit param to the post/id endpoint. When I view the post in the wp-admin, I see the slug. When I view the response from wp-api, i see "".
When I try to update the slug, I then get: "Invalid parameter(s): date_gmt (The date you provided is invalid.)"
So, for the slug, WordPress does not give a slug to posts before they have been published. The "slug" you are seeing in the admin is a optimistically rendered one for display purposes only, it's not the actual slug of the post yet at that point.
For the date, yes that is covered by #2303, so I'm going to close this out in favor of #2303
I am creating posts with title only. Then, I edit them and pass the
?context=editparam to the post/id endpoint. When I view the post in the wp-admin, I see the slug. When I view the response from wp-api, i see "".When I try to update the slug, I then get: "Invalid parameter(s): date_gmt (The date you provided is invalid.)"
I am authenticated via cookie.
What am I missing?