Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
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

Description

@beatelite

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.)"

I am authenticated via cookie.
What am I missing?

Activity

  1. beatelite commented on Sep 19, 2016

    @beatelite
    Author

    It looks like it could be related to #2303

    That the case or am I missing something?

  2. joehoyle commented on Sep 19, 2016

    @joehoyle
    Member

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions