[wp-trac] [WordPress Trac] #52422: Create a draft with the same slug as an existing post, the existing post will be 404.

WordPress Trac noreply at wordpress.org
Thu Sep 1 18:43:12 UTC 2022


#52422: Create a draft with the same slug as an existing post, the existing post
will be 404.
-------------------------------------------------+-------------------------
 Reporter:  Toro_Unit                            |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.1
Component:  Posts, Post Types                    |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests has-        |     Focuses:
  testing-info early dev-feedback commit         |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 In [changeset:"54055" 54055]:
 {{{
 #!CommitTicketReference repository="" revision="54055"
 Tests: Correct the `@covers` tag in a `WP_REST_Posts_Controller` test for
 unique post slugs.

 This addresses a notice when generating the code coverage report:
 {{{
 "@covers WP_REST_Request::create_item" is invalid
 }}}

 The `WP_REST_Request` class does not have a `create_item()` method,
 `WP_REST_Posts_Controller` is the class being tested here.

 Includes fixing a typo in the test method name.

 Follow-up to [53813].

 See #52422, #55652.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52422#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list