[wp-trac] [WordPress Trac] #44805: Resurrecting post from trash reverts its slug
WordPress Trac
noreply at wordpress.org
Thu Aug 16 06:26:13 UTC 2018
#44805: Resurrecting post from trash reverts its slug
--------------------------+-----------------------------
Reporter: ajmccluskey | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.9.7
Severity: normal | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
=== Steps to reproduce
Using the REST API:
* Create a post
* Delete the post (not forced)
* Update the post's slug
* Update the post's status to `publish`
==== Create
`POST wp-json/wp/v2/posts`
{{{#!json
{
"status": "publish",
"slug": "a",
"title": "a"
}
}}}
==== Delete
`DELETE wp-json/wp/v2/posts/<id>`
==== Update slug
`POST wp-json/wp/v2/posts/<id>`
{{{#!json
{
"slug": "foo"
}
}}}
==== Update status
`POST wp-json/wp/v2/posts/<id>`
{{{#!json
{
"status": "publish"
}
}}}
=== Expected
Post should be published with a slug of `foo` (the updated value)
=== Actual
Post is published with a slug of `a` (the old value)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44805>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list